diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-13 16:16:19 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-01-13 16:16:19 -0800 |
commit | bf48af53600e3e535cc4d0cfe9654c40023a7f70 (patch) | |
tree | 94db1f852c79c75d100f627615c2ba9cb8d440ec /activerecord/test/cases/relations_test.rb | |
parent | aec4aa1702753f29ae79787c743f6f047ad9a80d (diff) | |
parent | f1764a2de17bba07bad3ec0d88de152d8279d3bb (diff) | |
download | rails-bf48af53600e3e535cc4d0cfe9654c40023a7f70.tar.gz rails-bf48af53600e3e535cc4d0cfe9654c40023a7f70.tar.bz2 rails-bf48af53600e3e535cc4d0cfe9654c40023a7f70.zip |
Merge branch 'master' into set_binds
* master: (24 commits)
unscope should remove bind values associated with the where
reverse_order_value= is not private, so no need to send
avoid more dynamic symbols
no need to to_sym
recover from test runs that leave the database in a bad state
updates screenshot data [ci skip]
"serie" => "series"
revises a few things in the getting started guide [ci skip]
Favor canonical environment variables for secrets
removed extra comma [ci skip]
Only lookup `config.log_level` for stdlib `::Logger`. Closes #11665.
Updated Changelog to reflect removal of :dependent => :restrict
standardize on jruby_skip & rbx_skip
fix bug in becomes! when changing from base to subclass. Closes #13272.
highlight http://localhost:3000 in README.md. Closes #13643. [ci skip]
doc proc/lambda arg on inclusion validation. Closes #13689. [ci skip]
Skip Spring App Generator tests on JRuby
fixes a typo in a CHANGELOG
upgrade SDoc
fixes the Gemfile generator templates
...
Conflicts:
activerecord/test/cases/hot_compatibility_test.rb
Diffstat (limited to 'activerecord/test/cases/relations_test.rb')
-rw-r--r-- | activerecord/test/cases/relations_test.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/test/cases/relations_test.rb b/activerecord/test/cases/relations_test.rb index 031da8e6d6..a0896f7f8d 100644 --- a/activerecord/test/cases/relations_test.rb +++ b/activerecord/test/cases/relations_test.rb @@ -1524,6 +1524,15 @@ class RelationTest < ActiveRecord::TestCase assert merged.to_sql.include?("bbq") end + def test_unscope_removes_binds + left = Post.where(id: Arel::Nodes::BindParam.new('?')) + column = Post.columns_hash['id'] + left.bind_values += [[column, 20]] + + relation = left.unscope(where: :id) + assert_equal [], relation.bind_values + end + def test_merging_removes_rhs_bind_parameters left = Post.where(id: Arel::Nodes::BindParam.new('?')) column = Post.columns_hash['id'] |