diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/nodes/select_core.rb | 2 | ||||
-rw-r--r-- | lib/arel/select_manager.rb | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/lib/arel/nodes/select_core.rb b/lib/arel/nodes/select_core.rb index e52db6eb77..bd85dad24a 100644 --- a/lib/arel/nodes/select_core.rb +++ b/lib/arel/nodes/select_core.rb @@ -1,7 +1,7 @@ module Arel module Nodes class SelectCore - attr_reader :froms, :projections, :wheres, :groups + attr_accessor :froms, :projections, :wheres, :groups attr_accessor :having def initialize diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb index 7512dd90ed..df3f21c3b6 100644 --- a/lib/arel/select_manager.rb +++ b/lib/arel/select_manager.rb @@ -51,11 +51,7 @@ module Arel end def from table - if String === table - return self if @ctx.froms.any? { |x| x.name.to_s == table } - end - - @ctx.froms << table + @ctx.froms = [table] self end |