1
0
Fork 0
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:
Akira Matsuda 2020-10-02 13:39:00 +09:00
parent 9d2a2c775a
commit 02ad67841c

View file

@ -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