diff options
Diffstat (limited to 'lib/arel/primitives')
-rw-r--r-- | lib/arel/primitives/attribute.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/arel/primitives/attribute.rb b/lib/arel/primitives/attribute.rb index 39de11be26..5f8618ddfc 100644 --- a/lib/arel/primitives/attribute.rb +++ b/lib/arel/primitives/attribute.rb @@ -46,6 +46,14 @@ module Arel end module Transformations + def self.included(klass) + alias_method :eql?, :== + end + + def hash + name.hash + history.size.hash + end + def as(aliaz = nil) Attribute.new(relation, name, :alias => aliaz, :ancestor => self) end |