diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-03-02 21:10:35 -0800 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-03-02 21:10:35 -0800 |
commit | 6647a1e08eb9dc3512628882bcf60d421df74228 (patch) | |
tree | 204eebc8e9c6e6711331706dbd14815164db2eda /lib/active_relation/relations/rename.rb | |
parent | c54392872f024d55e8a23ead3065e6119a52b234 (diff) | |
download | rails-6647a1e08eb9dc3512628882bcf60d421df74228.tar.gz rails-6647a1e08eb9dc3512628882bcf60d421df74228.tar.bz2 rails-6647a1e08eb9dc3512628882bcf60d421df74228.zip |
scalars are now lifted; the heavy lifting is done by the operations on relation (select, join, etc.)
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 9a0e5552c7..ac5484bfff 100644 --- a/lib/active_relation/relations/rename.rb +++ b/lib/active_relation/relations/rename.rb @@ -15,7 +15,7 @@ module ActiveRelation end def attributes - relation.attributes.collect(&method(:baptize)) + relation.attributes.collect(&method(:christen)) end def descend(&block) @@ -23,7 +23,7 @@ module ActiveRelation end private - def baptize(attribute) + def christen(attribute) (attribute =~ self.attribute ? attribute.as(pseudonym) : attribute).bind(self) rescue nil end end |