Added the correct hierarchy of controllers for the administrative part
This commit is contained in:
parent
2984716870
commit
9d318db48f
10 changed files with 10 additions and 10 deletions
11
app/controllers/admin/application_controller.rb
Normal file
11
app/controllers/admin/application_controller.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Provides a base class for Admin controllers to subclass
|
||||
#
|
||||
# Automatically sets the layout and ensures an administrator is logged in
|
||||
class Admin::ApplicationController < ApplicationController
|
||||
layout 'admin'
|
||||
before_filter :authenticate_admin!
|
||||
|
||||
def authenticate_admin!
|
||||
return render_404 unless current_user.is_admin?
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue