diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-23 17:39:59 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-10-23 17:39:59 -0700 |
commit | 0e6c7e6de73fdddaf7f1486657f4d9f8e8f5fde3 (patch) | |
tree | 7722ca61adf305c8e1828ab5ddc60bc62c1a7308 | |
parent | b72ccd0244666b90ea8368e59a614df9f4480627 (diff) | |
parent | 621775361c2535b819ca1f3416170d4bb2deadd5 (diff) | |
download | rails-0e6c7e6de73fdddaf7f1486657f4d9f8e8f5fde3.tar.gz rails-0e6c7e6de73fdddaf7f1486657f4d9f8e8f5fde3.tar.bz2 rails-0e6c7e6de73fdddaf7f1486657f4d9f8e8f5fde3.zip |
Merge pull request #326 from claudiob/reuse-maybe-visit
Completes 08e6491 in reusing `maybe_visit`
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index bccf1d4061..a3f8cb565d 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -229,9 +229,9 @@ module Arel def visit_Arel_Nodes_SelectCore o, collector collector << "SELECT" - maybe_visit o.top, collector + collector = maybe_visit o.top, collector - maybe_visit o.set_quantifier, collector + collector = maybe_visit o.set_quantifier, collector unless o.projections.empty? collector << SPACE @@ -265,7 +265,7 @@ module Arel end end - maybe_visit o.having, collector + collector = maybe_visit o.having, collector unless o.windows.empty? collector << WINDOW |