diff options
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 1 | ||||
-rw-r--r-- | lib/arel/algebra/relations/utilities/compound.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index 4cd3f8e109..51c622cbe8 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -128,6 +128,7 @@ module Arel module DefaultOperations def attributes; [] end + def projections; [] end def wheres; [] end def orders; [] end def inserts; [] end diff --git a/lib/arel/algebra/relations/utilities/compound.rb b/lib/arel/algebra/relations/utilities/compound.rb index 9eca02c8c4..1a43c76a94 100644 --- a/lib/arel/algebra/relations/utilities/compound.rb +++ b/lib/arel/algebra/relations/utilities/compound.rb @@ -5,7 +5,7 @@ module Arel :column_for, :engine, :sources, :locked, :table_alias, :to => :relation - [:attributes, :wheres, :groupings, :orders, :havings].each do |operation_name| + [:attributes, :wheres, :groupings, :orders, :havings, :projections].each do |operation_name| class_eval <<-OPERATION, __FILE__, __LINE__ def #{operation_name} @#{operation_name} ||= relation.#{operation_name}.collect { |o| o.bind(self) } |