Module: ActionController::Filters::InstanceMethods
- Defined in:
- lib/action_controller/filters.rb
Overview
:nodoc:
Class Method Summary collapse
Instance Method Summary collapse
-
#after_action ⇒ Object
Calls all the defined after-filter filters, which are added by using “after_filter :method”.
-
#before_action ⇒ Object
Calls all the defined before-filter filters, which are added by using “before_filter :method”.
- #perform_action_with_filters ⇒ Object
Class Method Details
.append_features(base) ⇒ Object
284 285 286 287 288 289 290 |
# File 'lib/action_controller/filters.rb', line 284 def self.append_features(base) super base.class_eval { alias_method :perform_action_without_filters, :perform_action alias_method :perform_action, :perform_action_with_filters } end |
Instance Method Details
#after_action ⇒ Object
Calls all the defined after-filter filters, which are added by using “after_filter :method”. If any of the filters return false, no more filters will be executed.
306 307 308 |
# File 'lib/action_controller/filters.rb', line 306 def after_action #:doc: call_filters(self.class.after_filters) end |
#before_action ⇒ Object
Calls all the defined before-filter filters, which are added by using “before_filter :method”. If any of the filters return false, no more filters will be executed and the action is aborted.
300 301 302 |
# File 'lib/action_controller/filters.rb', line 300 def before_action #:doc: call_filters(self.class.before_filters) end |
#perform_action_with_filters ⇒ Object
292 293 294 295 296 |
# File 'lib/action_controller/filters.rb', line 292 def perform_action_with_filters return if before_action == false || performed? perform_action_without_filters after_action end |