Added the correct hierarchy of controllers for the administrative part

This commit is contained in:
Andrey Kumanyaev 2013-01-20 15:20:50 +04:00 committed by Dmitriy Zaporozhets
parent 2984716870
commit 9d318db48f
10 changed files with 10 additions and 10 deletions

View 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