aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-12-05 02:30:30 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-12-05 02:30:30 +0000
commita5fded3e88147769f4461d36bd60764ebcb95bc3 (patch)
tree31ddd850ee02af19e7d409cb2628cb12bccbe546 /activerecord/lib
parent0aec2423edbfa0a1fa99ae868273b3e9b29581d2 (diff)
downloadrails-a5fded3e88147769f4461d36bd60764ebcb95bc3.tar.gz
rails-a5fded3e88147769f4461d36bd60764ebcb95bc3.tar.bz2
rails-a5fded3e88147769f4461d36bd60764ebcb95bc3.zip
Fix that options[:from] table names should never be quoted [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index de1ca24d6d..e9a1eb67b9 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -1247,7 +1247,7 @@ module ActiveRecord
def construct_finder_sql_with_included_associations(options, join_dependency)
scope = scope(:find)
- sql = "SELECT #{column_aliases(join_dependency)} FROM #{connection.quote_table_name((scope && scope[:from]) || options[:from] || table_name)} "
+ sql = "SELECT #{column_aliases(join_dependency)} FROM #{(scope && scope[:from]) || options[:from] || quoted_table_name} "
sql << join_dependency.join_associations.collect{|join| join.association_join }.join
add_joins!(sql, options, scope)