Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove instance level attr_readonly setting was deprecated.

  • Loading branch information...
commit 0a88c10e54f4e795856cf9ed6335b2a384b5c26f 1 parent e185ba2
@kennyj kennyj authored
View
6 activerecord/lib/active_record/readonly_attributes.rb
@@ -20,11 +20,5 @@ def readonly_attributes
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
6 activerecord/test/cases/base_test.rb
@@ -581,12 +581,6 @@ def test_readonly_attributes
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
Please sign in to comment.
Something went wrong with that request. Please try again.