aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_relation/primitives
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-02-11 23:09:15 -0800
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-02-11 23:09:15 -0800
commit0d70ce37e510c83d5fc42f88b04314f40d87fe96 (patch)
tree03183df1b69ebb31bd5148bc8a9443647348ff3a /lib/active_relation/primitives
parent82cd330dbac31d79e23cc06273321ecbac2b9077 (diff)
downloadrails-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/primitives')
-rw-r--r--lib/active_relation/primitives/attribute.rb2
-rw-r--r--lib/active_relation/primitives/expression.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/active_relation/primitives/attribute.rb b/lib/active_relation/primitives/attribute.rb
index 893feefef2..de25a90868 100644
--- a/lib/active_relation/primitives/attribute.rb
+++ b/lib/active_relation/primitives/attribute.rb
@@ -15,7 +15,7 @@ module ActiveRelation
Attribute.new(relation, name, aliaz, self)
end
- def substitute(new_relation)
+ def bind(new_relation)
relation == new_relation ? self : Attribute.new(new_relation, name, @alias, self)
end
diff --git a/lib/active_relation/primitives/expression.rb b/lib/active_relation/primitives/expression.rb
index ff07c40109..6ff06c7f81 100644
--- a/lib/active_relation/primitives/expression.rb
+++ b/lib/active_relation/primitives/expression.rb
@@ -10,8 +10,8 @@ module ActiveRelation
end
module Transformations
- def substitute(new_relation)
- new_relation == relation ? self : Expression.new(attribute.substitute(new_relation), function_sql, @alias, self)
+ def bind(new_relation)
+ new_relation == relation ? self : Expression.new(attribute.bind(new_relation), function_sql, @alias, self)
end
def as(aliaz)