Module: Shaf::ControllerHooks
- Defined in:
- lib/shaf/extensions/controller_hooks.rb
Instance Method Summary collapse
- #after_action(method_name = nil, **options, &block) ⇒ Object
- #before_action(method_name = nil, **options, &block) ⇒ Object
Instance Method Details
#after_action(method_name = nil, **options, &block) ⇒ Object
9 10 11 |
# File 'lib/shaf/extensions/controller_hooks.rb', line 9 def after_action(method_name = nil, **, &block) __action_hook(:after, method_name, block, **) end |
#before_action(method_name = nil, **options, &block) ⇒ Object
5 6 7 |
# File 'lib/shaf/extensions/controller_hooks.rb', line 5 def before_action(method_name = nil, **, &block) __action_hook(:before, method_name, block, **) end |