diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index f8b3089a82..09491c988b 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -89,10 +89,10 @@ module Arel case relation when String, Nodes::SqlLiteral raise if relation.blank? - from Nodes::StringJoin.new(@ctx.froms, relation) - else - from klass.new(@ctx.froms, relation, nil) + klass = Nodes::StringJoin end + + from create_join(@ctx.froms, relation, nil, klass) end def having expr