Ticket #5216: habtm_join_table_test.patch1.diff
| File habtm_join_table_test.patch1.diff, 0.9 kB (added by anonymous, 3 years ago) |
|---|
-
lib/active_record/associations/has_and_belongs_to_many_association.rb
old new 113 113 attributes[column.name] = @owner.quoted_id 114 114 when @reflection.association_foreign_key 115 115 attributes[column.name] = record.quoted_id 116 when record.class.primary_key 117 # if its record's primary key, its almost always wrong to use 118 # its value for the join_table insertion. 116 119 else 117 120 if record.attributes.has_key?(column.name) 118 121 value = @owner.send(:quote, record[column.name], column)