Module: Changebase::ActionController::ClassMethods
- Defined in:
- lib/changebase/action_controller.rb
Instance Method Summary collapse
Instance Method Details
#changebase(*keys, &block) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/changebase/action_controller.rb', line 9 def changebase(*keys, &block) method = if block block elsif keys.size > 1 keys.pop else keys.first end @changebase_metadata ||= [] @changebase_metadata << [keys, method] end |
#changebase_metadata ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/changebase/action_controller.rb', line 22 def = if instance_variable_defined?(:@changebase_metadata) @changebase_metadata else [] end if self.superclass.respond_to?(:changebase_metadata) + self.superclass. else end end |