Skip to content
Browse files

id is a public method

  • Loading branch information...
1 parent f576d7c commit fa8b290496789eb037d4fad89acea1cb0a534f35 @spastorino spastorino committed with tenderlove
View
4 activerecord/lib/active_record/associations/has_and_belongs_to_many_association.rb
@@ -49,9 +49,9 @@ def insert_record(record, force = true, validate = true)
attributes = columns.inject({}) do |attrs, column|
case column.name.to_s
when @reflection.primary_key_name.to_s
- attrs[relation[column.name]] = @owner.send(:id)
+ attrs[relation[column.name]] = @owner.id
when @reflection.association_foreign_key.to_s
- attrs[relation[column.name]] = record.send(:id)
+ attrs[relation[column.name]] = record.id
else
if record.has_attribute?(column.name)
value = @owner.send(:quote_value, record[column.name], column)

0 comments on commit fa8b290

Please sign in to comment.
Something went wrong with that request. Please try again.