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 +4 -4
- data/app/models/concerns/settingson/base.rb +8 -2
- data/lib/settingson/version.rb +1 -1
- 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: d9298127ac3bc52f6f495f16af6cc3fcf44c5805
|
4
|
+
data.tar.gz: f195fa16e67fb250a47c0a280296654c839eca05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/settingson/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2014-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|