weighable 0.1.0 → 0.1.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/core_ext/numeric.rb +1 -1
- data/lib/weighable/core_ext/string.rb +1 -1
- data/lib/weighable/model.rb +1 -1
- data/lib/weighable/version.rb +1 -1
- data/lib/weighable/weight.rb +1 -1
- metadata +2 -3
- data/lib/weighable/inflections.rb +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17e7bee879cdfb4aca37dd69d5677c39c6a6a221
|
4
|
+
data.tar.gz: 756192d72542ae5bcb60e457e9ee8fa8f22fcf02
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f66202def0fab1ca40c610dc71bfb34ecad05922e471975e1747706dba87209dbf89a69ff26e260f08acfb4d1e92748d643d935344ccadd88edc9ef1aab22d12
|
7
|
+
data.tar.gz: 929f67f8295a99423b0f7d914b60cb5b70635a523e25be2d28b7157a7d2900a9cb6fae788debcc6049bb2032f17ec3ea8b5e3bee6db416ab6f3e49bd24c015e9
|
data/lib/weighable/model.rb
CHANGED
@@ -9,7 +9,7 @@ module Weighable
|
|
9
9
|
define_method "#{column}=" do |weight|
|
10
10
|
weight = Weight.new(weight['value'], weight['unit']) if weight.is_a?(Hash)
|
11
11
|
original_unit = weight.try(:unit)
|
12
|
-
weight = weight.try(:to, store_as) if original_unit && original_unit != :
|
12
|
+
weight = weight.try(:to, store_as) if original_unit && original_unit != :unit
|
13
13
|
|
14
14
|
public_send("#{column}_value=", weight.try(:value))
|
15
15
|
public_send("#{column}_unit=", weight.try(:unit))
|
data/lib/weighable/version.rb
CHANGED
data/lib/weighable/weight.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weighable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Trae Robrock
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -136,7 +136,6 @@ files:
|
|
136
136
|
- lib/weighable/core_ext/numeric.rb
|
137
137
|
- lib/weighable/core_ext/string.rb
|
138
138
|
- lib/weighable/errors.rb
|
139
|
-
- lib/weighable/inflections.rb
|
140
139
|
- lib/weighable/model.rb
|
141
140
|
- lib/weighable/railtie.rb
|
142
141
|
- lib/weighable/version.rb
|