Method: Sequel::Plugins::Touch::ClassMethods#touch_associations
- Defined in:
- lib/sequel/plugins/touch.rb
#touch_associations(*associations) ⇒ Object
Add additional associations to be touched. See the :association option of the Sequel::Plugin::Touch.configure method for the format of the associations arguments.
73 74 75 76 77 78 79 80 81 |
# File 'lib/sequel/plugins/touch.rb', line 73 def touch_associations(*associations) associations.flatten.each do |a| a = {a=>touch_column} if a.is_a?(Symbol) a.each do |k,v| raise(Error, "invalid association: #{k}") unless association_reflection(k) touched_associations[k] = v end end end |