diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2017-01-07 17:30:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-07 17:30:34 -0500 |
commit | 11a50f48113df300f3225e4963aeb1030ec6ad35 (patch) | |
tree | a83fb72f41fea92ec9e58fb242c966b0342219dd /activerecord/lib/active_record | |
parent | 7b13236818ffb26e94d72885e75966efffd71659 (diff) | |
parent | c322b7c2b1ace59921e0613151b26c8256e62a82 (diff) | |
download | rails-11a50f48113df300f3225e4963aeb1030ec6ad35.tar.gz rails-11a50f48113df300f3225e4963aeb1030ec6ad35.tar.bz2 rails-11a50f48113df300f3225e4963aeb1030ec6ad35.zip |
Merge pull request #27598 from NickLaMuro/fix-deep-nesting-where-clauses-with-joins
Fix bug with symbolized keys in .where with nested join
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/table_metadata.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/table_metadata.rb b/activerecord/lib/active_record/table_metadata.rb index b618e5cfcd..71efc1829a 100644 --- a/activerecord/lib/active_record/table_metadata.rb +++ b/activerecord/lib/active_record/table_metadata.rb @@ -44,7 +44,7 @@ module ActiveRecord end def associated_table(table_name) - association = klass._reflect_on_association(table_name) || klass._reflect_on_association(table_name.singularize) + association = klass._reflect_on_association(table_name) || klass._reflect_on_association(table_name.to_s.singularize) if !association && table_name == arel_table.name return self |