123456789_123456789_123456789_123456789_123456789_

Module: AbstractController::Callbacks

Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Included In:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Defined in: actionpack/lib/abstract_controller/callbacks.rb

Overview

Abstract Controller provides hooks during the life cycle of a controller action. Callbacks allow you to trigger logic during this cycle. Available callbacks are:

  • after_action

  • append_after_action

  • append_around_action

  • append_before_action

  • around_action

  • before_action

  • prepend_after_action

  • prepend_around_action

  • prepend_before_action

  • skip_after_action

  • skip_around_action

  • skip_before_action

Constant Summary

::ActiveSupport::Callbacks - Included

CALLBACK_FILTER_TYPES

::ActiveSupport::Callbacks - Attributes & Methods

Class Method Summary

::ActiveSupport::DescendantsTracker - self

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

Instance Method Summary

::ActiveSupport::Callbacks - Included

#run_callbacks

Runs the callbacks for the given event.

DSL Calls

included

[ GitHub ]


32
33
34
35
36
37
# File 'actionpack/lib/abstract_controller/callbacks.rb', line 32

included do
  define_callbacks :process_action,
                   terminator: ->(controller, result_lambda) { result_lambda.call; controller.performed? },
                   skip_after_callbacks_if_terminated: true
  mattr_accessor :raise_on_missing_callback_actions, default: false
end

Class Attribute Details

.__callbacks (rw)

[ GitHub ]

  
# File 'activesupport/lib/active_support/callbacks.rb', line 69

class_attribute :__callbacks, instance_writer: false, instance_predicate: false, default: {}

Instance Attribute Details

#__callbacks (readonly)

[ GitHub ]

  
# File 'activesupport/lib/active_support/callbacks.rb', line 69

class_attribute :__callbacks, instance_writer: false, instance_predicate: false, default: {}