aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/engines/sql/relations/utilities
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-17 18:47:45 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-17 18:47:45 -0400
commit2e6fbf4f75c8e33380623b52e86ca8b90037712f (patch)
tree78d222d35a4025e4be86240fb7c5267e7abfe38f /lib/arel/engines/sql/relations/utilities
parent982f100d49095614df320d449f66f69aa827a763 (diff)
downloadrails-2e6fbf4f75c8e33380623b52e86ca8b90037712f.tar.gz
rails-2e6fbf4f75c8e33380623b52e86ca8b90037712f.tar.bz2
rails-2e6fbf4f75c8e33380623b52e86ca8b90037712f.zip
Extracting #build_query method for creating SQL from parts
Diffstat (limited to 'lib/arel/engines/sql/relations/utilities')
-rw-r--r--lib/arel/engines/sql/relations/utilities/compound.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/engines/sql/relations/utilities/compound.rb b/lib/arel/engines/sql/relations/utilities/compound.rb
index b63a829c67..f8ce4033fd 100644
--- a/lib/arel/engines/sql/relations/utilities/compound.rb
+++ b/lib/arel/engines/sql/relations/utilities/compound.rb
@@ -1,6 +1,10 @@
module Arel
class Compound < Relation
delegate :table, :table_sql, :to => :relation
+
+ def build_query(*parts)
+ parts.compact.join("\n")
+ end
end
end