Class: Admin::ApplicationController

Inherits:
ApplicationController show all
Defined in:
app/controllers/admin/application_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#fresh_when, #redirect_back_or_default, #redirect_referrer_or_default, #render_403, #render_404, #render_optional_error_file, #require_user, #set_locale, #set_seo_meta, #store_location, #unread_notify_count

Instance Method Details

#require_adminObject


9
10
11
# File 'app/controllers/admin/application_controller.rb', line 9

def require_admin
  render_404 unless current_user.admin?
end

#set_active_menuObject


13
14
15
# File 'app/controllers/admin/application_controller.rb', line 13

def set_active_menu
  @current = ['/' + ['admin', controller_name].join('/')]
end