weighable 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/weighable/model.rb +1 -1
- data/lib/weighable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7ff7faabe8fef92f0beaeb070fc0b614110a7df
|
4
|
+
data.tar.gz: 5a0212d39f373ffebf1077d1a48ac8473b821372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cabe4371179b9235cc9832a90e07c0e61d42c9a90cea6aa5ebab8e7dbda2e4387f9bfac6bf31124a055b6b8c1e4370b9ecea1aac7ec7827a09995e5950c203d
|
7
|
+
data.tar.gz: 5201bab61c76b92bd9f263d49bc87be30a356c2bd2acc8be035d4365b8959c5fd836f10985a5f54b62280e2a27986a651287a541d6a856fee07404ccd03c5f35
|
data/lib/weighable/model.rb
CHANGED
@@ -22,7 +22,7 @@ module Weighable
|
|
22
22
|
|
23
23
|
if precision.present?
|
24
24
|
local_precision = precision.is_a?(Proc) ? instance_exec(&precision) : precision
|
25
|
-
weight = weight.round
|
25
|
+
weight = weight.try(:round, local_precision)
|
26
26
|
end
|
27
27
|
|
28
28
|
public_send("#{column}_value=", weight.try(:value))
|
data/lib/weighable/version.rb
CHANGED