mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Integer#odd? and even? are public methods
This commit is contained in:
parent
9d2a2c775a
commit
02ad67841c
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ module ActiveModel
|
|||
options.slice(*CHECKS.keys).each do |option, option_value|
|
||||
case option
|
||||
when :odd, :even
|
||||
unless value.to_i.send(CHECKS[option])
|
||||
unless value.to_i.public_send(CHECKS[option])
|
||||
record.errors.add(attr_name, option, **filtered_options(value))
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue