diff options
author | Neeraj Singh <neerajdotname@gmail.com> | 2010-07-19 15:32:00 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-07-20 16:45:42 -0700 |
commit | f576d7cf848717384799a9e9669b253ccc94deb5 (patch) | |
tree | 4cf0e9c980e133c713374477e17411236f24aaf6 /activerecord/lib/active_record | |
parent | a63566dda8246bd57e80032a1213532d0dc2ae0b (diff) | |
download | rails-f576d7cf848717384799a9e9669b253ccc94deb5.tar.gz rails-f576d7cf848717384799a9e9669b253ccc94deb5.tar.bz2 rails-f576d7cf848717384799a9e9669b253ccc94deb5.zip |
Ensure that primary_keys of HABTM records is not double quoted
[#5152 state:reslved]
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb index c989c3536d..aba66d5a96 100644 --- a/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb +++ b/activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb @@ -49,9 +49,9 @@ module ActiveRecord attributes = columns.inject({}) do |attrs, column| case column.name.to_s when @reflection.primary_key_name.to_s - attrs[relation[column.name]] = owner_quoted_id + attrs[relation[column.name]] = @owner.send(:id) when @reflection.association_foreign_key.to_s - attrs[relation[column.name]] = record.quoted_id + attrs[relation[column.name]] = record.send(:id) else if record.has_attribute?(column.name) value = @owner.send(:quote_value, record[column.name], column) |