Class: Admin::AdminController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- PagesCore::BaseController
- ApplicationController
- Admin::AdminController
- Defined in:
- app/controllers/admin/admin_controller.rb
Direct Known Subclasses
AccountRecoveriesController, AttachmentsController, CalendarsController, ImagesController, InvitesController, NewsController, OtpSecretsController, PagesController, RecoveryCodesController, SessionsController, UsersController
Instance Attribute Summary
Attributes included from PagesCore::Authentication
Class Method Summary collapse
-
.underscore ⇒ Object
Get name of class with in lowercase, with underscores.
Instance Method Summary collapse
Methods included from PagesCore::StaticCacheController
#disable_static_cache!, #static_cached?
Methods included from PagesCore::PoliciesHelper
#policy, #verify_policy, #verify_policy_with_proc
Methods included from PagesCore::ProcessTitler
inc_number_of_requests, original_title
Methods included from PagesCore::LocalesHelper
Methods included from PagesCore::ErrorRenderer
Methods included from PagesCore::Authentication
#authenticate!, #deauthenticate!, #logged_in?
Class Method Details
.underscore ⇒ Object
Get name of class with in lowercase, with underscores.
16 17 18 |
# File 'app/controllers/admin/admin_controller.rb', line 16 def underscore ActiveSupport::Inflector.underscore(to_s).split("/").last end |
Instance Method Details
#redirect ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/controllers/admin/admin_controller.rb', line 21 def redirect if Page.news_pages.any? redirect_to news_admin_pages_url(content_locale) else redirect_to admin_pages_url(content_locale) end end |