aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/active_relation/relations/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/active_relation/relations/base.rb b/lib/active_relation/relations/base.rb
index ea3404e7af..2c79911900 100644
--- a/lib/active_relation/relations/base.rb
+++ b/lib/active_relation/relations/base.rb
@@ -82,7 +82,7 @@ module ActiveRelation
sql = [
"SELECT #{attributes.collect{ |a| a.to_sql(:use_alias => true, :use_parens => true) }.join(', ')}",
"FROM #{quote_table_name(table)}",
- (joins.to_sql(:quote => false) unless joins.blank?),
+ (joins unless joins.blank?),
("WHERE #{selects.collect{|s| s.to_sql(:quote => false)}.join("\n\tAND ")}" unless selects.blank?),
("ORDER BY #{orders.collect(&:to_sql)}" unless orders.blank?),
("LIMIT #{limit.to_sql}" unless limit.blank?),