mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
undef_method can take varargs
This commit is contained in:
parent
d80c18a391
commit
1edf103b52
1 changed files with 1 additions and 1 deletions
|
@ -329,7 +329,7 @@ module ActiveModel
|
||||||
# person.name_short? # => NoMethodError
|
# person.name_short? # => NoMethodError
|
||||||
def undefine_attribute_methods
|
def undefine_attribute_methods
|
||||||
generated_attribute_methods.module_eval do
|
generated_attribute_methods.module_eval do
|
||||||
instance_methods.each { |m| undef_method(m) }
|
undef_method(*instance_methods)
|
||||||
end
|
end
|
||||||
attribute_method_matchers_cache.clear
|
attribute_method_matchers_cache.clear
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue