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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 93579900f5196c25ce60ee15387ca5b96129816a
4
- data.tar.gz: bdb56bb627bd07719ab0988f855f8d5e19befa5a
3
+ metadata.gz: 1d3b3252fdb6fa30a77fff71d4e44453fc219fdb
4
+ data.tar.gz: fdc1925080d493ef344c521250bd8959b81bdd31
5
5
  SHA512:
6
- metadata.gz: c1a0591f051467b4d69543f1673d00dd0264632d6537214d86acddf08a2b9d7376a0b8fe6dbd8dfc2927b1989e83a7d21ba9f264361fb45f00135ebdda6d9ded
7
- data.tar.gz: ad8ec29f78df72217aae03b532c27cc6b66d66a11d96ef479d0df1337d750a8ae1f75be325b1d3fadd2bb9e989bafb59f586c362e77b228cb043beda0cb3623c
6
+ metadata.gz: 7311d56ff5f01dafba6ea7adf75a4d985a0654483a02f4544057f0830da7eb036c949791620fc1ba13b78d7dfe6e34639f7d19d3ba18ee41eef1c5a5c2922144
7
+ data.tar.gz: 84ff349eee0070ab70b56d6747b1aa103ca43caf235b1d68e3ff49cbbc4955ccf1f804b62ddda69289ee6433a62c6ff6394cfc1f661963799fe360ca17d07770
data/lib/numbers.rb CHANGED
@@ -31,10 +31,6 @@ module Numbers
31
31
  self.to_euro(label, :precision => 0)
32
32
  end
33
33
 
34
- def to_a
35
- [self]
36
- end
37
-
38
34
  # Inflate number, y = duration of years, f = percentage
39
35
  # tested
40
36
  def infla(y=40,f=2)
@@ -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
 
@@ -151,10 +151,6 @@ module StringAndMore
151
151
  self.singularize.camelize.constantize
152
152
  end
153
153
 
154
- def to_a
155
- return [self]
156
- end
157
-
158
154
  #== HTML Styling
159
155
  # as the function names say
160
156
 
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.8
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-10-19 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails