diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-02-11 23:09:15 -0800 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-02-11 23:09:15 -0800 |
commit | 0d70ce37e510c83d5fc42f88b04314f40d87fe96 (patch) | |
tree | 03183df1b69ebb31bd5148bc8a9443647348ff3a /lib/active_relation/relations/rename.rb | |
parent | 82cd330dbac31d79e23cc06273321ecbac2b9077 (diff) | |
download | rails-0d70ce37e510c83d5fc42f88b04314f40d87fe96.tar.gz rails-0d70ce37e510c83d5fc42f88b04314f40d87fe96.tar.bz2 rails-0d70ce37e510c83d5fc42f88b04314f40d87fe96.zip |
rename substitute to bind since it 'binds' an object to a new relation.
Diffstat (limited to 'lib/active_relation/relations/rename.rb')
-rw-r--r-- | lib/active_relation/relations/rename.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/active_relation/relations/rename.rb b/lib/active_relation/relations/rename.rb index 83ab41df70..6b1b29bf75 100644 --- a/lib/active_relation/relations/rename.rb +++ b/lib/active_relation/relations/rename.rb @@ -19,12 +19,12 @@ module ActiveRelation end def attributes - relation.attributes.collect(&method(:substitute)) + relation.attributes.collect(&method(:baptize)) end private - def substitute(attribute) - (attribute =~ self.attribute ? attribute.as(pseudonym) : attribute).substitute(self) rescue nil + def baptize(attribute) + (attribute =~ self.attribute ? attribute.as(pseudonym) : attribute).bind(self) rescue nil end end end
\ No newline at end of file |