diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-09 12:06:51 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-09 12:06:51 -0300 |
commit | c0c3ef3a298f0f63e4dc32699c2e5f0e2cab3faf (patch) | |
tree | 330759d8b4492ef7c649c69374851854e29ec084 /activerecord/lib | |
parent | c6451333a3842b495ea5e68620fb7b882cc89549 (diff) | |
parent | 2b2f41fd972133b8bfbbc94ebe3bec6b27a0689a (diff) | |
download | rails-c0c3ef3a298f0f63e4dc32699c2e5f0e2cab3faf.tar.gz rails-c0c3ef3a298f0f63e4dc32699c2e5f0e2cab3faf.tar.bz2 rails-c0c3ef3a298f0f63e4dc32699c2e5f0e2cab3faf.zip |
Merge pull request #20437 from pwnall/abstract_fixtures
Fix crash when loading fixture with belongs_to association defined in abstract base class
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 7760fd33b7..738fab2bd9 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -668,7 +668,7 @@ module ActiveRecord row[association.foreign_type] = $1 end - fk_type = association.active_record.type_for_attribute(fk_name).type + fk_type = reflection_class.type_for_attribute(fk_name).type row[fk_name] = ActiveRecord::FixtureSet.identify(value, fk_type) end when :has_many |