Module: Touch::ClassMethods
- Defined in:
- lib/touch.rb
Instance Method Summary collapse
Instance Method Details
#touch(association_name, options = {}) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/touch.rb', line 8 def touch(association_name, = {}) = .dup .reverse_merge!(on: %w[create update destroy]) [:on].map!(&:to_s) [:on].each do |event| add_collection_touch_for(association_name, event) end end |