diff options
author | kennyj <kennyj@gmail.com> | 2013-06-02 08:55:37 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-06-02 10:25:41 +0900 |
commit | 0a88c10e54f4e795856cf9ed6335b2a384b5c26f (patch) | |
tree | c5c2c1c6962ea3a5279decfe840f03b88107faad | |
parent | e185ba24c83bc87fec3de808311c68b15a6ff16d (diff) | |
download | rails-0a88c10e54f4e795856cf9ed6335b2a384b5c26f.tar.gz rails-0a88c10e54f4e795856cf9ed6335b2a384b5c26f.tar.bz2 rails-0a88c10e54f4e795856cf9ed6335b2a384b5c26f.zip |
Remove instance level attr_readonly setting was deprecated.
-rw-r--r-- | activerecord/lib/active_record/readonly_attributes.rb | 6 | ||||
-rw-r--r-- | activerecord/test/cases/base_test.rb | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/activerecord/lib/active_record/readonly_attributes.rb b/activerecord/lib/active_record/readonly_attributes.rb index 8499bb16e7..b3ddfd63d4 100644 --- a/activerecord/lib/active_record/readonly_attributes.rb +++ b/activerecord/lib/active_record/readonly_attributes.rb @@ -20,11 +20,5 @@ module ActiveRecord self._attr_readonly end end - - def _attr_readonly - message = "Instance level _attr_readonly method is deprecated, please use class level method." - ActiveSupport::Deprecation.warn message - defined?(@_attr_readonly) ? @_attr_readonly : self.class._attr_readonly - end end end diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 7051822f73..395f28f280 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -581,12 +581,6 @@ class BasicsTest < ActiveRecord::TestCase assert_equal "changed", post.body end - def test_attr_readonly_is_class_level_setting - post = ReadonlyTitlePost.new - assert_raise(NoMethodError) { post._attr_readonly = [:title] } - assert_deprecated { post._attr_readonly } - end - def test_non_valid_identifier_column_name weird = Weird.create('a$b' => 'value') weird.reload |