boxxspring 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/boxxspring/resources/property.rb +14 -2
- data/lib/boxxspring/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: ccdf5594fdb3d8f7aa6ac04e9f58fef6a7d76865
|
4
|
+
data.tar.gz: 1e650f4468869b6936f1a5fa72d0cc921704951e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb5d20355d1bb366af9a01d6f249c169d88418876359adda894413f6cf77d5639524047b99bcbe875a7fb74738d2d9e9f19bbf80ca23dedae31a9b4b6ce3e7be
|
7
|
+
data.tar.gz: 9905786b7c7f3cb5f3830bbc8d1ed4d032b377623f2c8fbed29e97cb16f88b9681521f9bf5a5eb87b5d9504253368e6e7e794f49c6ef1f7407a014fc306696cd
|
@@ -21,12 +21,24 @@ module Boxxspring
|
|
21
21
|
|
22
22
|
has_many :groups
|
23
23
|
has_many :pages
|
24
|
-
has_many :services
|
25
|
-
has_many :settings
|
26
24
|
has_many :pictures
|
25
|
+
|
27
26
|
has_one :theme
|
28
27
|
has_one :default_advertisement
|
29
28
|
|
29
|
+
has_many :services
|
30
|
+
has_many :settings
|
31
|
+
def settings_content_by_name( name, default_result = nil )
|
32
|
+
setting = self.settings.detect { | setting | setting.name == name }
|
33
|
+
result = setting.nil? ? default_result : setting.content
|
34
|
+
|
35
|
+
# convert the result to boolean when boolean
|
36
|
+
result = true if result =~ ( /(true)$/i )
|
37
|
+
result = false if result =~ ( /(false)$/i )
|
38
|
+
|
39
|
+
result
|
40
|
+
end
|
41
|
+
|
30
42
|
has_many :errors
|
31
43
|
|
32
44
|
def operation( path )
|
data/lib/boxxspring/version.rb
CHANGED