Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Don't compute this string again

  • Loading branch information...
commit acbabd96268237826e1ab094273a1d7d53b4e579 1 parent deb90d9
@spastorino spastorino authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  activemodel/lib/active_model/validations/numericality.rb
View
2  activemodel/lib/active_model/validations/numericality.rb
@@ -24,7 +24,7 @@ def check_validity!
def validate_each(record, attr_name, value)
before_type_cast = "#{attr_name}_before_type_cast"
- raw_value = record.send("#{attr_name}_before_type_cast") if record.respond_to?(before_type_cast.to_sym)
+ raw_value = record.send(before_type_cast) if record.respond_to?(before_type_cast.to_sym)
raw_value ||= value
return if options[:allow_nil] && raw_value.nil?
Please sign in to comment.
Something went wrong with that request. Please try again.