Module: Resourceize::Before::ClassMethods
- Defined in:
- lib/resourceize/before.rb
Instance Method Summary collapse
Instance Method Details
#before(action_or_array, &block) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/resourceize/before.rb', line 25 def before(action_or_array, &block) action_or_array = [action_or_array] if !action_or_array.is_a? Array actions = action_or_array self.send(:before_filter, :only => actions) do |controller| controller.instance_eval(&block) end end |