aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2015-01-26 16:20:58 -0700
committerSean Griffin <sean@thoughtbot.com>2015-01-26 16:20:58 -0700
commit8436e2c2bd91c1a57fb1273218a5428cc2c6b45a (patch)
tree6abad2641d03bea22570321a680b789e5202e368 /activerecord/test
parent765a3123c840a24980aea69154cfea55967edd37 (diff)
downloadrails-8436e2c2bd91c1a57fb1273218a5428cc2c6b45a.tar.gz
rails-8436e2c2bd91c1a57fb1273218a5428cc2c6b45a.tar.bz2
rails-8436e2c2bd91c1a57fb1273218a5428cc2c6b45a.zip
Remove `Relation#bind_values=`
The last place that was assigning it was when `from` is called with a relation to use as a subquery. The implementation was actually completely broken, and would break if you called `from` more than once, or if you called it on a relation, which also had its own join clause, as the bind values would get completely scrambled. The simplest solution was to just move it into its own array, since creating a `FromClause` class for this would be overkill.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/cases/relation/mutation_test.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation/mutation_test.rb b/activerecord/test/cases/relation/mutation_test.rb
index 003d870045..d25d8ac06e 100644
--- a/activerecord/test/cases/relation/mutation_test.rb
+++ b/activerecord/test/cases/relation/mutation_test.rb
@@ -28,7 +28,7 @@ module ActiveRecord
@relation ||= Relation.new FakeKlass.new('posts'), Post.arel_table, Post.predicate_builder
end
- (Relation::MULTI_VALUE_METHODS - [:references, :extending, :order, :unscope, :select]).each do |method|
+ (Relation::MULTI_VALUE_METHODS - [:references, :extending, :order, :unscope, :select, :from_bind]).each do |method|
test "##{method}!" do
assert relation.public_send("#{method}!", :foo).equal?(relation)
assert_equal [:foo], relation.public_send("#{method}_values")