Fixed validates_is_numeric when dealing with an actual float
This commit is contained in:
parent
82090cb780
commit
baabe40674
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ module CouchRest
|
|||
value = target.send(field_name)
|
||||
return true if @options[:allow_nil] && value.nil?
|
||||
|
||||
value = value.kind_of?(Float) ? value.to_s('F') : value.to_s
|
||||
value = (defined?(BigDecimal) && value.kind_of?(BigDecimal)) ? value.to_s('F') : value.to_s
|
||||
|
||||
error_message = @options[:message]
|
||||
precision = @options[:precision]
|
||||
|
|
Loading…
Reference in a new issue