mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Avoid a new hash allocation
This commit is contained in:
parent
4c7e3a3087
commit
12815e0d44
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ module ActiveModel
|
|||
option_value = record.send(option_value) if option_value.is_a?(Symbol)
|
||||
|
||||
unless value.send(CHECKS[option], option_value)
|
||||
record.errors.add(attr_name, option, filtered_options(value).merge(count: option_value))
|
||||
record.errors.add(attr_name, option, filtered_options(value).merge!(count: option_value))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue