aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/factory_methods.rb4
-rw-r--r--lib/arel/select_manager.rb2
2 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/factory_methods.rb b/lib/arel/factory_methods.rb
index 8fcb78069f..e45cc21170 100644
--- a/lib/arel/factory_methods.rb
+++ b/lib/arel/factory_methods.rb
@@ -9,5 +9,9 @@ module Arel
def create_string_join from, to
create_join from, to, nil, Nodes::StringJoin
end
+
+ def create_and clauses
+ Nodes::And.new clauses
+ end
end
end
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb
index 40e197910b..f8b3089a82 100644
--- a/lib/arel/select_manager.rb
+++ b/lib/arel/select_manager.rb
@@ -198,7 +198,7 @@ module Arel
def collapse exprs
return exprs.first if exprs.length == 1
- Nodes::And.new exprs.compact.map { |expr|
+ create_and exprs.compact.map { |expr|
if String === expr
Arel.sql(expr)
else