1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Remove instance level attr_readonly setting was deprecated.

This commit is contained in:
kennyj 2013-06-02 08:55:37 +09:00
parent e185ba24c8
commit 0a88c10e54
2 changed files with 0 additions and 12 deletions

View file

@ -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

View file

@ -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