aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2015-06-09 12:06:51 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2015-06-09 12:06:51 -0300
commitc0c3ef3a298f0f63e4dc32699c2e5f0e2cab3faf (patch)
tree330759d8b4492ef7c649c69374851854e29ec084 /activerecord/lib/active_record
parentc6451333a3842b495ea5e68620fb7b882cc89549 (diff)
parent2b2f41fd972133b8bfbbc94ebe3bec6b27a0689a (diff)
downloadrails-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/active_record')
-rw-r--r--activerecord/lib/active_record/fixtures.rb2
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