aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-26 16:12:59 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-26 16:12:59 -0700
commit765a3123c840a24980aea69154cfea55967edd37 (patch)
treeb0cea9152302b63e9a6232da562779e8ead0e856
parent76661dc64f843085102070a650d426e155fc9a8e (diff)
downloadrails-765a3123c840a24980aea69154cfea55967edd37.tar.gz
rails-765a3123c840a24980aea69154cfea55967edd37.tar.bz2
rails-765a3123c840a24980aea69154cfea55967edd37.zip
Remove unused `bind` and `bind!` methods from `Relation`
-rw-r--r--activerecord/lib/active_record/relation/query_methods.rb9
-rw-r--r--activerecord/test/cases/relations_test.rb9
2 files changed, 0 insertions, 18 deletions
diff --git a/activerecord/lib/active_record/relation/query_methods.rb b/activerecord/lib/active_record/relation/query_methods.rb
index 2d6c167c69..c42882a947 100644
--- a/activerecord/lib/active_record/relation/query_methods.rb
+++ b/activerecord/lib/active_record/relation/query_methods.rb
@@ -435,15 +435,6 @@ module ActiveRecord
self
end
- def bind(value) # :nodoc:
- spawn.bind!(value)
- end
-
- def bind!(value) # :nodoc:
- self.bind_values += [value]
- self
- end
-
# Returns a new relation, which is the result of filtering the current relation
# according to the conditions in the arguments.
#
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb
index 742c14b00e..ecb30af12b 100644
--- a/activerecord/test/cases/relations_test.rb
+++ b/activerecord/test/cases/relations_test.rb
@@ -39,15 +39,6 @@ class RelationTest < ActiveRecord::TestCase
assert_equal van, Minivan.where(:minivan_id => [van]).to_a.first
end
- def test_bind_values
- relation = Post.all
- assert_equal [], relation.bind_values
-
- relation2 = relation.bind 'foo'
- assert_equal %w{ foo }, relation2.bind_values
- assert_equal [], relation.bind_values
- end
-
def test_two_scopes_with_includes_should_not_drop_any_include
# heat habtm cache
car = Car.incl_engines.incl_tyres.first