ecm_cms2 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c2be0df946d8e10f75ce902c37106fa9ee567cc1
4
- data.tar.gz: 1ecbdb9993a88833ce301c289fdaeb2f7b341e0e
3
+ metadata.gz: b7cf417eadabcf58c8bef9250e8c60ed099a1db6
4
+ data.tar.gz: cef10bd01e97e372f0d8c9570df0285c0ad55389
5
5
  SHA512:
6
- metadata.gz: a01a1e69bb41b2bcf69341155b7cb0061860f29b855e31cbf8a5852e462c21fd07c006c42b258e7ff39e69fb3a8ce74a23848b70b3a10cbef1e6336281950688
7
- data.tar.gz: f5fed6120aa5551dbd407a1d62297fc87bdffbf9c2dd40aa3f73d52024f5690c7d3a0d2fecc83c5c35ffaa313d9a202799c4a72bea5d81ad8e40535f2f132e52
6
+ metadata.gz: 033f610671de719fe8fada46fef812872b76bfa555faddab1a5226c79b3f5dcec5bfd45daafda616abff782427df381f360b7eca18f783653edbd3243cb823cb
7
+ data.tar.gz: 4e78889dfcaffd305091ef334651809e0ec5d1b506037b2b1c6a4710e7d4465636ce16e0d6715d0bab64fed4e273a6d7d103184fa1bd2718530759ef579af2fd
@@ -16,10 +16,9 @@ module Ecm
16
16
  rendered_body = RedCloth.new(content_block.body).to_html
17
17
  output << "<% content_for :#{content_block.content_box_name} do %>#{rendered_body}<% end %>"
18
18
  end
19
-
20
- content_for_title = "<% content_for :title do %>#{record.title}<% end %>"
21
- content_for_meta_description = "<% content_for :meta_description do %>#{record.meta_description}<% end %>"
22
- output << content_for_title << content_for_meta_description
19
+
20
+ output << content_for_title(record)
21
+ output << content_for_meta_description(record)
23
22
 
24
23
  output << record.body unless record.body.nil?
25
24
 
@@ -37,6 +36,26 @@ module Ecm
37
36
  def template_class
38
37
  'Ecm::Cms::Page'
39
38
  end
39
+
40
+ private
41
+
42
+ def content_for_title(record)
43
+ case record.handler
44
+ when 'haml'
45
+ "= content_for(:title) { \"#{record.title}\" }\r\n"
46
+ else
47
+ "<% content_for :title do %>#{record.title}<% end %>"
48
+ end
49
+ end
50
+
51
+ def content_for_meta_description(record)
52
+ case record.handler
53
+ when 'haml'
54
+ "= content_for(:meta_description) { \"#{record.meta_description}\" }\r\n"
55
+ else
56
+ "<% content_for :meta_description do %>#{record.meta_description}<% end %>"
57
+ end
58
+ end
40
59
  end
41
60
  end
42
61
  end
@@ -1,5 +1,5 @@
1
1
  module Ecm
2
2
  module Cms
3
- VERSION = '3.0.0'
3
+ VERSION = '3.0.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_cms2
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel