diff options
author | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 18:47:45 -0400 |
---|---|---|
committer | Bryan Helmkamp <bryan@brynary.com> | 2009-05-17 18:47:45 -0400 |
commit | 2e6fbf4f75c8e33380623b52e86ca8b90037712f (patch) | |
tree | 78d222d35a4025e4be86240fb7c5267e7abfe38f /lib/arel/engines/sql/relations/utilities | |
parent | 982f100d49095614df320d449f66f69aa827a763 (diff) | |
download | rails-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.rb | 4 |
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 |