aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-24 14:16:38 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-24 14:16:38 -0800
commitee74f2c6238dbaca00e9b667c3c239f3cae8aca5 (patch)
tree772f54508fab4fd33e847e61d8aae65486e6b0ba /activerecord
parent38eb01863c9281d142c6494bae485b9c215ec9b7 (diff)
downloadrails-ee74f2c6238dbaca00e9b667c3c239f3cae8aca5.tar.gz
rails-ee74f2c6238dbaca00e9b667c3c239f3cae8aca5.tar.bz2
rails-ee74f2c6238dbaca00e9b667c3c239f3cae8aca5.zip
alias should be a SQL literal
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/class_methods/join_dependency.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/class_methods/join_dependency.rb b/activerecord/lib/active_record/associations/class_methods/join_dependency.rb
index 19d2d55ca0..6ab7bd0b06 100644
--- a/activerecord/lib/active_record/associations/class_methods/join_dependency.rb
+++ b/activerecord/lib/active_record/associations/class_methods/join_dependency.rb
@@ -37,7 +37,7 @@ module ActiveRecord
join_parts.collect { |join_part|
table = join_part.aliased_table
join_part.column_names_with_alias.collect{ |column_name, aliased_name|
- table[column_name].as aliased_name
+ table[column_name].as Arel.sql(aliased_name)
}
}.flatten
end