aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/relations/projection.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_relation/relations/projection.rb')
-rw-r--r--lib/active_relation/relations/projection.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/active_relation/relations/projection.rb b/lib/active_relation/relations/projection.rb
index df25d16234..131db916f0 100644
--- a/lib/active_relation/relations/projection.rb
+++ b/lib/active_relation/relations/projection.rb
@@ -1,14 +1,14 @@
module ActiveRelation
module Relations
class Projection < Compound
- attr_reader :relation, :attributes
+ attr_reader :attributes
def initialize(relation, *attributes)
@relation, @attributes = relation, attributes
end
def ==(other)
- relation == other.relation and attributes == other.attributes
+ self.class == other.class and relation == other.relation and attributes == other.attributes
end
def qualify