diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-02-24 16:24:38 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-02-24 16:24:38 -0800 |
commit | f4bee7ecbfd664a9268ae8a6cdf3deabf0ed74e4 (patch) | |
tree | 6d34ad08f99ec8dc0192a7b1474342634616f41d /activerecord/lib/active_record | |
parent | f4f94081dd1a3e9ff99e17ae88b7d91fcdbb19fc (diff) | |
parent | 8e16a00de4f77f15e405d083d535b92a23779d9d (diff) | |
download | rails-f4bee7ecbfd664a9268ae8a6cdf3deabf0ed74e4.tar.gz rails-f4bee7ecbfd664a9268ae8a6cdf3deabf0ed74e4.tar.bz2 rails-f4bee7ecbfd664a9268ae8a6cdf3deabf0ed74e4.zip |
Merge pull request #17426 from jpcody/fixture_associations_fix
Rely on through table name in has_many fixtures
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 739be524da..75b0e1e08d 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -708,6 +708,10 @@ module ActiveRecord def lhs_key @association.through_reflection.foreign_key end + + def join_table + @association.through_reflection.table_name + end end private |