forked from fixin.me/fixin.me
Generate Units::Defaults controller
bin/rails g controller Units/Defaults index
This commit is contained in:
8
app/controllers/units/defaults_controller.rb
Normal file
8
app/controllers/units/defaults_controller.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
class Units::DefaultsController < ApplicationController
|
||||
before_action except: :index do
|
||||
raise AccessForbidden unless current_user.at_least(:admin)
|
||||
end
|
||||
|
||||
def index
|
||||
end
|
||||
end
|
||||
2
app/helpers/units/defaults_helper.rb
Normal file
2
app/helpers/units/defaults_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module Units::DefaultsHelper
|
||||
end
|
||||
2
app/views/units/defaults/index.html.erb
Normal file
2
app/views/units/defaults/index.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1>Units::Defaults#index</h1>
|
||||
<p>Find me in app/views/units/defaults/index.html.erb</p>
|
||||
Reference in New Issue
Block a user