Class: PagesCore::AdminController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- BaseController
- ApplicationController
- PagesCore::AdminController
- Includes:
- PagesCore::Admin::PersistentParams
- Defined in:
- app/controllers/pages_core/admin_controller.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes included from Authentication
Class Method Summary collapse
-
.underscore ⇒ Object
Get name of class with in lowercase, with underscores.
Instance Method Summary collapse
Methods included from StaticCacheController
Methods included from PoliciesHelper
#policy, #verify_policy, #verify_policy_with_proc
Methods included from ProcessTitler
inc_number_of_requests, original_title
Methods included from ErrorRenderer
Methods included from Authentication
#authenticate!, #deauthenticate!, #logged_in?
Class Method Details
.underscore ⇒ Object
Get name of class with in lowercase, with underscores.
18 19 20 |
# File 'app/controllers/pages_core/admin_controller.rb', line 18 def underscore ActiveSupport::Inflector.underscore(to_s).split("/").last end |
Instance Method Details
#redirect ⇒ Object
23 24 25 26 27 28 29 |
# File 'app/controllers/pages_core/admin_controller.rb', line 23 def redirect if Page.news_pages.any? redirect_to news_admin_pages_url(@locale) else redirect_to admin_pages_url(@locale) end end |