friendly_extensions 0.2.8 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/numbers.rb +0 -4
- data/lib/smart_currency.rb +4 -1
- data/lib/string_and_more.rb +0 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d3b3252fdb6fa30a77fff71d4e44453fc219fdb
|
4
|
+
data.tar.gz: fdc1925080d493ef344c521250bd8959b81bdd31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7311d56ff5f01dafba6ea7adf75a4d985a0654483a02f4544057f0830da7eb036c949791620fc1ba13b78d7dfe6e34639f7d19d3ba18ee41eef1c5a5c2922144
|
7
|
+
data.tar.gz: 84ff349eee0070ab70b56d6747b1aa103ca43caf235b1d68e3ff49cbbc4955ccf1f804b62ddda69289ee6433a62c6ff6394cfc1f661963799fe360ca17d07770
|
data/lib/numbers.rb
CHANGED
data/lib/smart_currency.rb
CHANGED
@@ -11,11 +11,14 @@ module SmartCurrency
|
|
11
11
|
include InstanceMethods
|
12
12
|
auto_attributes = []
|
13
13
|
self.skip_time_zone_conversion_for_attributes = []
|
14
|
+
|
15
|
+
self.send(:attr_accessor, :disable_smart_currency)
|
16
|
+
|
14
17
|
attributes = self.columns.select {|c| (c.type == :integer || c.type == :decimal) && !c.name.match("id") }
|
15
18
|
|
16
19
|
attributes.each do |a|
|
17
20
|
define_method("#{a.name}=") do |val|
|
18
|
-
self[a.name.to_sym] = currency_to_db(val)
|
21
|
+
self[a.name.to_sym] = (disable_smart_currency == true ? val : currency_to_db(val))
|
19
22
|
end
|
20
23
|
end
|
21
24
|
|
data/lib/string_and_more.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: friendly_extensions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Eck
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|