diff options
Diffstat (limited to 'lib/arel/relations/compound.rb')
-rw-r--r-- | lib/arel/relations/compound.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/arel/relations/compound.rb b/lib/arel/relations/compound.rb index 9921568157..f8af190644 100644 --- a/lib/arel/relations/compound.rb +++ b/lib/arel/relations/compound.rb @@ -12,7 +12,15 @@ module Arel end def selects - @selects || relation.selects.collect { |s| s.bind(self) } + @selects ||= relation.selects.collect { |s| s.bind(self) } + end + + def groupings + @groupings ||= relation.groupings.collect { |g| g.bind(self) } + end + + def orders + @orders ||= relation.orders.collect { |o| o.bind(self) } end end end
\ No newline at end of file |