diff options
Diffstat (limited to 'lib/active_relation/relations/rename.rb')
-rw-r--r-- | lib/active_relation/relations/rename.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/active_relation/relations/rename.rb b/lib/active_relation/relations/rename.rb index c7b99c2127..cff042dbc6 100644 --- a/lib/active_relation/relations/rename.rb +++ b/lib/active_relation/relations/rename.rb @@ -23,7 +23,7 @@ module ActiveRelation protected def attribute(name) case - when name == self.alias then schmattribute.alias(self.alias) + when name == self.alias then schmattribute.as(self.alias) when relation[name] == schmattribute then nil else relation[name] end @@ -31,7 +31,7 @@ module ActiveRelation private def substitute(a) - a == schmattribute ? a.alias(self.alias) : a + a == schmattribute ? a.as(self.alias) : a end end end |