File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def dangerous_attribute_methods # :nodoc:
34
34
Base . private_instance_methods -
35
35
Base . superclass . instance_methods -
36
36
Base . superclass . private_instance_methods +
37
- %i[ __id__ dup freeze hash object_id class clone ]
37
+ %i[ __id__ dup freeze frozen? hash object_id class clone ]
38
38
) . map { |m | -m . to_s } . to_set . freeze
39
39
end
40
40
end
Original file line number Diff line number Diff line change @@ -662,7 +662,7 @@ def topic.approved; false; end
662
662
end
663
663
664
664
test "raises ActiveRecord::DangerousAttributeError when defining an AR method or dangerous Object method in a model" do
665
- %w( save create_or_update hash dup ) . each do |method |
665
+ %w( save create_or_update hash dup frozen? ) . each do |method |
666
666
klass = Class . new ( ActiveRecord ::Base )
667
667
klass . class_eval "def #{ method } () 'defined #{ method } ' end"
668
668
assert_raise ActiveRecord ::DangerousAttributeError do
You can’t perform that action at this time.
0 commit comments