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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 906b969d9a6b956493a508649e507e5f868c4c9a
4
- data.tar.gz: d64c6cfb72a741a8e0632d25d1e1fd7433e95b29
3
+ metadata.gz: ccdf5594fdb3d8f7aa6ac04e9f58fef6a7d76865
4
+ data.tar.gz: 1e650f4468869b6936f1a5fa72d0cc921704951e
5
5
  SHA512:
6
- metadata.gz: 85a7f17c006fe50bd07e6adbaca9410b372f60d565415f9cc44376c6ee1ef2651652621315838f4968ff9c2962998777a988a22c5456bd191503be83af2d7ad9
7
- data.tar.gz: 0fd816bb910a98699ca2ebb6f1ba6f4c1b45a125e4f14d63a0fbae87d8d0bd76f0d132fe36c7b9ede2328980434279fdd3390ae739d41e6adf54e28601c483d9
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 )
@@ -1,3 +1,3 @@
1
1
  module Boxxspring
2
- VERSION = '2.4.2'
2
+ VERSION = '2.4.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boxxspring
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.2
4
+ version: 2.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kristoph Cichocki-Romanov