Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/data_mapper/validation/rule/numericalness.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def valid?(resource)
def value_as_string(value)
case value
# Avoid Scientific Notation in Float to_s
when Float then value.to_d.to_s('F')
when Float then value.to_d(options.fetch(:precision, nil)).to_s('F')
when BigDecimal then value.to_s('F')
else value.to_s
end
Expand Down