diff options
author | Victor Costan <costan@gmail.com> | 2015-06-04 12:27:45 -0400 |
---|---|---|
committer | Victor Costan <costan@gmail.com> | 2015-06-04 12:38:00 -0400 |
commit | 2b2f41fd972133b8bfbbc94ebe3bec6b27a0689a (patch) | |
tree | 7c8b25bb4451139b0d43c587082ef56d59d964ee /activerecord/lib/active_record | |
parent | 7220ffcffd0085b3caee872102b3b28f3ca35c83 (diff) | |
download | rails-2b2f41fd972133b8bfbbc94ebe3bec6b27a0689a.tar.gz rails-2b2f41fd972133b8bfbbc94ebe3bec6b27a0689a.tar.bz2 rails-2b2f41fd972133b8bfbbc94ebe3bec6b27a0689a.zip |
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.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 1ec8f818cd..eed1853841 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -669,7 +669,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 |