settingson 1.2.11 → 1.2.12
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 -0
- data/lib/settingson/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b45e60730f89bf47e5758708491459f63e10ba85
|
4
|
+
data.tar.gz: 840ad3c212a9499cb5b3d01abae616eb35b3eca5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 244d1072fced9f3eac923f2ce3e7c2abe34eb0fe1adc05a834264493b459a2c5c52c640e508c8f101118cf1a62388eac88f57882b1839e6df72c60336561f078
|
7
|
+
data.tar.gz: 27a139bbb354c976aec63f7b3ba36f5cd741ae60d804cb24acad9ac1d70c99ff0d796a900f7e305ba9fcc316f623c0c24b279eb9e45b564375698c84d9e56746
|
@@ -26,6 +26,10 @@ module Settingson::Base
|
|
26
26
|
else
|
27
27
|
self.class.create(key: @settingson, value: args.first.to_yaml)
|
28
28
|
end
|
29
|
+
when /(.+)\?$/ #
|
30
|
+
|
31
|
+
@settingson = "#{@settingson}.#{$1}"
|
32
|
+
self.class.find_by(key: @settingson).present?
|
29
33
|
|
30
34
|
else # getter
|
31
35
|
|
@@ -55,6 +59,10 @@ module Settingson::Base
|
|
55
59
|
else
|
56
60
|
create(key: @settingson, value: args.first.to_yaml, settingson: @settingson)
|
57
61
|
end
|
62
|
+
|
63
|
+
when /(.+)\?$/ #
|
64
|
+
|
65
|
+
find_by(key: $1).present?
|
58
66
|
|
59
67
|
else # getter
|
60
68
|
|
data/lib/settingson/version.rb
CHANGED