Module: BeforeActions::Controller::ClassMethods

Defined in:
lib/before_actions/controller.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#after_actions_blockObject (readonly)

Returns the value of attribute after_actions_block.



6
7
8
# File 'lib/before_actions/controller.rb', line 6

def after_actions_block
  @after_actions_block
end

#before_actions_blockObject (readonly)

Returns the value of attribute before_actions_block.



6
7
8
# File 'lib/before_actions/controller.rb', line 6

def before_actions_block
  @before_actions_block
end

Instance Method Details

#after_actions(&block) ⇒ Object



11
12
13
14
# File 'lib/before_actions/controller.rb', line 11

def after_actions(&block)
  @after_actions_block = block
  after_filter :execute_after_actions
end

#before_actions(&block) ⇒ Object



7
8
9
10
# File 'lib/before_actions/controller.rb', line 7

def before_actions(&block)
  @before_actions_block = block
  before_filter :execute_before_actions
end