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
226 227 228 229 230 231 232 |
# File 'lib/action_controller/filters.rb', line 226 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.
248 249 250 |
# File 'lib/action_controller/filters.rb', line 248 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.
242 243 244 |
# File 'lib/action_controller/filters.rb', line 242 def before_action #:doc: call_filters(self.class.before_filters) end |
#perform_action_with_filters ⇒ Object
234 235 236 237 238 |
# File 'lib/action_controller/filters.rb', line 234 def perform_action_with_filters return if before_action == false perform_action_without_filters after_action end |