diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-07 15:11:22 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-12-07 15:11:22 -0800 |
commit | af5dd388cc1d5f58ac2f010730a301e0c7d7e6e6 (patch) | |
tree | 97b25512546ac9932c42898c0185bd97d5fc36f5 /lib | |
parent | 8f6752ef6e4c5ab0aaafad8c543f9925a7b33774 (diff) | |
download | rails-af5dd388cc1d5f58ac2f010730a301e0c7d7e6e6.tar.gz rails-af5dd388cc1d5f58ac2f010730a301e0c7d7e6e6.tar.bz2 rails-af5dd388cc1d5f58ac2f010730a301e0c7d7e6e6.zip |
just return a blank string if the base from is not a join
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/visitors/join_sql.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/visitors/join_sql.rb b/lib/arel/visitors/join_sql.rb index 7ba2bde540..427f2bb726 100644 --- a/lib/arel/visitors/join_sql.rb +++ b/lib/arel/visitors/join_sql.rb @@ -12,7 +12,8 @@ module Arel private def visit_Arel_Nodes_SelectCore o - [o.froms].grep(Nodes::Join).map { |x| visit x }.join ', ' + return '' unless Nodes::Join === o.from + visit o.from end def visit_Arel_Nodes_StringJoin o |