Module: ActionComponent::Callbacks
- Included in:
- Base
- Defined in:
- lib/action_component/callbacks.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepended(base) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/action_component/callbacks.rb', line 3 def self.prepended(base) base.class_attribute :before_render_callback_methods, :after_render_callback_methods base.before_render_callback_methods = [] base.after_render_callback_methods = [] base.extend ClassMethods end |
Instance Method Details
#render_view ⇒ Object
22 23 24 25 26 27 |
# File 'lib/action_component/callbacks.rb', line 22 def render_view before_render_callback_methods.each { |method| send(method) } result = super after_render_callback_methods.each { |method| send(method) } result end |