Module: Shaf::ControllerHooks

Defined in:
lib/shaf/extensions/controller_hooks.rb

Instance Method Summary collapse

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, **options, &block)
  __action_hook(:after, method_name, block, **options)
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, **options, &block)
  __action_hook(:before, method_name, block, **options)
end