diff options
author | Suraj N. Kurapati <sunaku@gmail.com> | 2012-09-22 15:27:10 -0700 |
---|---|---|
committer | Suraj N. Kurapati <sunaku@gmail.com> | 2012-09-22 15:27:10 -0700 |
commit | c001fadd2f2f420267db809439581e388684e9de (patch) | |
tree | 14200d7a8835e36f686cbaba590a3e4ae5aaa2f0 /lib/arel | |
parent | e032dabdb2adb34e3db8cd35e9f58bc0536475c1 (diff) | |
download | rails-c001fadd2f2f420267db809439581e388684e9de.tar.gz rails-c001fadd2f2f420267db809439581e388684e9de.tar.bz2 rails-c001fadd2f2f420267db809439581e388684e9de.zip |
to_sql: add support for emitting SQL subqueries
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index a350daa3da..f5be934ba5 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -254,6 +254,10 @@ key on UpdateManager using UpdateManager#key= "(#{visit o.expr})" end + def visit_Arel_SelectManager o + "(#{o.to_sql.rstrip})" + end + def visit_Arel_Nodes_Ascending o "#{visit o.expr} ASC" end |