honey-cms 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/cms/attribute.rb +9 -4
  2. data/lib/cms/helper.rb +1 -0
  3. metadata +1 -1
data/lib/cms/attribute.rb CHANGED
@@ -5,9 +5,14 @@ class CMS::Attribute
5
5
  @name = name
6
6
  @format = format
7
7
  @options = options
8
- @attr_options = {
9
- # null: false
10
- }
8
+ @attr_options = if self.format.boolean?
9
+ {
10
+ null: false,
11
+ default: false
12
+ }
13
+ else
14
+ {}
15
+ end
11
16
  end
12
17
 
13
18
  def format
@@ -76,7 +81,7 @@ class CMS::Attribute
76
81
 
77
82
  def reference_to
78
83
  if reference?
79
- @reference_to ||= CMS::Configuration.types.find{|t| t.name == @options['reference_to']}
84
+ @reference_to ||= CMS::Configuration.types.find{ |t| t.name == @options['reference_to'] }
80
85
  end
81
86
  end
82
87
 
data/lib/cms/helper.rb CHANGED
@@ -71,6 +71,7 @@ module CMS::Helper
71
71
  end
72
72
 
73
73
  def cms_content_parse content
74
+ content = content.gsub(' ', ' ')
74
75
  CMS::ViewTags.instance.parse content, context: self
75
76
  end
76
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honey-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: