diff options
Diffstat (limited to 'lib/arel/relations/alias.rb')
-rw-r--r-- | lib/arel/relations/alias.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/arel/relations/alias.rb b/lib/arel/relations/alias.rb index 329f94638e..b4e8965625 100644 --- a/lib/arel/relations/alias.rb +++ b/lib/arel/relations/alias.rb @@ -1,13 +1,19 @@ module Arel class Alias < Compound - attr_reader :alias - def initialize(relation) @relation = relation end def ==(other) - self.equal? other + equal? other + end + + def table + self + end + + def relation_for(attribute) + self[attribute] and self end end end
\ No newline at end of file |