diff options
Diffstat (limited to 'lib/arel/relations')
-rw-r--r-- | lib/arel/relations/operations/project.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/arel/relations/operations/project.rb b/lib/arel/relations/operations/project.rb index d7835edda4..5507ea3163 100644 --- a/lib/arel/relations/operations/project.rb +++ b/lib/arel/relations/operations/project.rb @@ -2,7 +2,7 @@ module Arel class Project < Compound attributes :relation, :projections deriving :== - + def initialize(relation, *projections, &block) @relation = relation @projections = (projections + (block_given?? [yield(relation)] : [])).collect { |p| p.bind(relation) } @@ -11,9 +11,9 @@ module Arel def attributes @attributes ||= projections.collect { |p| p.bind(self) } end - + def externalizable? attributes.any?(&:aggregation?) or relation.externalizable? end end -end
\ No newline at end of file +end |