Class: ActiveElement::ControllerAction
- Inherits:
-
Object
- Object
- ActiveElement::ControllerAction
- Includes:
- Paintbrush
- Defined in:
- lib/active_element/controller_action.rb
Overview
Processes all controller actions, verifies permissions, issues redirects, etc.
Instance Method Summary collapse
-
#initialize(controller) ⇒ ControllerAction
constructor
A new instance of ControllerAction.
- #process_action ⇒ Object
Constructor Details
#initialize(controller) ⇒ ControllerAction
Returns a new instance of ControllerAction.
8 9 10 |
# File 'lib/active_element/controller_action.rb', line 8 def initialize(controller) @controller = controller end |
Instance Method Details
#process_action ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/active_element/controller_action.rb', line 12 def process_action Rails.logger.info("#{ActiveElement.log_tag} #{}") process_pre_render and return if warn "#{ActiveElement.log_tag} #{}" if Rails.env.test? return controller.redirect_to redirect_path if redirect_to_default_landing_page? render_forbidden end |