settingson 1.2.18 → 1.2.19

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: 7978117328c05069be1c0328fe152404b3f7a533
4
- data.tar.gz: 5f4ea21db417a7d258eef212855018369fddac66
3
+ metadata.gz: d9298127ac3bc52f6f495f16af6cc3fcf44c5805
4
+ data.tar.gz: f195fa16e67fb250a47c0a280296654c839eca05
5
5
  SHA512:
6
- metadata.gz: f7b67e0e16a786527e983d30ac133d64c51bb7b9b0ace3d718e787d79b7c32be6f34d4dfa1f03302b3e90054ba1128e701812802f46885f86a28511c1f38c210
7
- data.tar.gz: ea750da83fb336228c46b0eec373d9a4227556bba420b90482a4a4661ec56145c69b548de98f7cef292b67dea75d6e6fdb3495044aee18cb136af5471a278923
6
+ metadata.gz: b55abdadd2a9ce5426a51b3287a4b1aa558e758fbed7e61e8321d7927e2e16314156ec7ae4269d5072f3a742e5778fe12995ea414f93463082c3107cf34fe4a5
7
+ data.tar.gz: 1116dc1d9fa5ed9cbdd5399ffee128d44fdd665ee035b00cf715f0f5c55c105f2b5c9b51ff6d23686f8173c21cd23d5bd7abff478cd81a77a9d35a33dadd44c1
@@ -4,6 +4,10 @@ module Settingson::Base
4
4
 
5
5
  included do
6
6
  attr_accessor :settingson
7
+
8
+ after_find do |setting|
9
+ setting.value = YAML.load(setting.value)
10
+ end
7
11
  end
8
12
 
9
13
  def to_s
@@ -40,7 +44,8 @@ module Settingson::Base
40
44
  end
41
45
 
42
46
  if record = self.class.find_by(key: @settingson)
43
- YAML.load(record.value)
47
+ # YAML.load(record.value)
48
+ record.value
44
49
  else
45
50
  self
46
51
  end
@@ -72,7 +77,8 @@ module Settingson::Base
72
77
  else # getter
73
78
 
74
79
  if record = find_by(key: symbol.to_s)
75
- YAML.load record.value
80
+ # YAML.load record.value
81
+ record.value
76
82
  else
77
83
  new(settingson: symbol.to_s)
78
84
  end
@@ -1,3 +1,3 @@
1
1
  module Settingson
2
- VERSION = "1.2.18"
2
+ VERSION = "1.2.19"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: settingson
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.18
4
+ version: 1.2.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - dan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-17 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails