diff options
Diffstat (limited to 'activerecord')
-rwxr-xr-x | activerecord/lib/active_record/associations.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 5b0ba86308..7d5fd8e96c 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -1755,7 +1755,8 @@ module ActiveRecord end def count_aliases_from_table_joins(name) - quoted_name = join_base.active_record.connection.quote_table_name(name.downcase) + # quoted_name should be downcased as some database adapters (Oracle) return quoted name in uppercase + quoted_name = join_base.active_record.connection.quote_table_name(name.downcase).downcase join_sql = join_base.table_joins.to_s.downcase join_sql.blank? ? 0 : # Table names |