aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/fixtures.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-02-24 16:24:38 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2015-02-24 16:24:38 -0800
commitf4bee7ecbfd664a9268ae8a6cdf3deabf0ed74e4 (patch)
tree6d34ad08f99ec8dc0192a7b1474342634616f41d /activerecord/lib/active_record/fixtures.rb
parentf4f94081dd1a3e9ff99e17ae88b7d91fcdbb19fc (diff)
parent8e16a00de4f77f15e405d083d535b92a23779d9d (diff)
downloadrails-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/fixtures.rb')
-rw-r--r--activerecord/lib/active_record/fixtures.rb4
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