Class: ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- ApplicationController
- Includes:
- LoginSystem
- Defined in:
- app/controllers/application_controller.rb
Direct Known Subclasses
Admin::ConfigurationController, Admin::ExtensionsController, Admin::PreferencesController, Admin::ReferencesController, Admin::ResourceController, SiteController, SocialMailerController
Instance Attribute Summary collapse
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#pagination_parameters ⇒ Object
readonly
Returns the value of attribute pagination_parameters.
-
#trusty_config ⇒ Object
Returns the value of attribute trusty_config.
Instance Method Summary collapse
- #after_sign_in_path_for(_resource) ⇒ Object
-
#initialize ⇒ ApplicationController
constructor
A new instance of ApplicationController.
- #template_name ⇒ Object
Methods included from LoginSystem
Constructor Details
#initialize ⇒ ApplicationController
Returns a new instance of ApplicationController.
20 21 22 23 |
# File 'app/controllers/application_controller.rb', line 20 def initialize super @trusty_config = TrustyCms::Config end |
Instance Attribute Details
#cache ⇒ Object
Returns the value of attribute cache.
16 17 18 |
# File 'app/controllers/application_controller.rb', line 16 def cache @cache end |
#pagination_parameters ⇒ Object (readonly)
Returns the value of attribute pagination_parameters.
17 18 19 |
# File 'app/controllers/application_controller.rb', line 17 def pagination_parameters @pagination_parameters end |
#trusty_config ⇒ Object
Returns the value of attribute trusty_config.
16 17 18 |
# File 'app/controllers/application_controller.rb', line 16 def trusty_config @trusty_config end |
Instance Method Details
#after_sign_in_path_for(_resource) ⇒ Object
25 26 27 |
# File 'app/controllers/application_controller.rb', line 25 def after_sign_in_path_for(_resource) admin_pages_path end |
#template_name ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'app/controllers/application_controller.rb', line 29 def template_name case action_name when 'index' 'index' when 'new', 'create' 'new' when 'show' 'show' when 'edit', 'update' 'edit' when 'remove', 'destroy' 'remove' else action_name end end |