1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

remove HABTM special cases from the fixtures

This commit is contained in:
Aaron Patterson 2013-10-02 15:51:29 -07:00
parent 8e4afa4eb1
commit 99185f0004

View file

@ -639,8 +639,6 @@ module ActiveRecord
if association.options[:through]
add_join_records(rows, row, HasManyThroughProxy.new(association))
end
when :has_and_belongs_to_many
add_join_records(rows, row, HABTMProxy.new(association))
end
end
end
@ -674,16 +672,6 @@ module ActiveRecord
end
end
class HABTMProxy < ReflectionProxy # :nodoc:
def rhs_key
@association.association_foreign_key
end
def lhs_key
@association.foreign_key
end
end
private
def primary_key_name
@primary_key_name ||= model_class && model_class.primary_key