diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-25 23:56:06 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-04-25 23:57:09 +0200 |
commit | f9d5a7bb8c5d224f689dafb4ff641e2ced244f03 (patch) | |
tree | 80204955bb82e9f972606514da2710796628225d /activerecord/test/cases/base_test.rb | |
parent | 873c13fc0ddc35e64a6b3abc8bde9721bd12b6b7 (diff) | |
download | rails-f9d5a7bb8c5d224f689dafb4ff641e2ced244f03.tar.gz rails-f9d5a7bb8c5d224f689dafb4ff641e2ced244f03.tar.bz2 rails-f9d5a7bb8c5d224f689dafb4ff641e2ced244f03.zip |
deprecated the use of the guard_protected_attributes argument with attributes= in AR in favor of assign_attributes(attrs, :without_protection => true)
Diffstat (limited to 'activerecord/test/cases/base_test.rb')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index ef833857ce..5ee3b2d776 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -489,6 +489,12 @@ class BasicsTest < ActiveRecord::TestCase assert_equal 'value2', weird.send('a$b') end + def test_attributes_guard_protected_attributes_is_deprecated + attributes = { "title" => "An amazing title" } + topic = Topic.new + assert_deprecated { topic.send(:attributes=, attributes, false) } + end + def test_multiparameter_attributes_on_date attributes = { "last_read(1i)" => "2004", "last_read(2i)" => "6", "last_read(3i)" => "24" } topic = Topic.find(1) |