lib/torque/postgresql/autosave_association.rb in torque-postgresql-1.0.0 vs lib/torque/postgresql/autosave_association.rb in torque-postgresql-1.0.1
- old
+ new
@@ -1,11 +1,10 @@
module Torque
module PostgreSQL
module AutosaveAssociation
module ClassMethods
def add_autosave_association_callbacks(reflection)
- return super unless reflection.connected_through_array? &&
- reflection.macro.eql?(:belongs_to_many)
+ return super unless reflection.macro.eql?(:belongs_to_many)
save_method = :"autosave_associated_records_for_#{reflection.name}"
define_non_cyclic_method(save_method) { save_belongs_to_many_array(reflection) }
before_save(:before_save_collection_association)