ecm_cms2 2.1.3 → 2.1.4

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: 47bde24294ee5440659170fcb27d6c00a9e71f36
4
- data.tar.gz: ebf4a99b0216c2bec3ed1b86c2eda5e487e2c9e3
3
+ metadata.gz: fcf16db9c902ff4a888e6a4c4a4152d368326bf5
4
+ data.tar.gz: f1ea612f387bdecb5798fddc7a20c429ddfa736b
5
5
  SHA512:
6
- metadata.gz: c16e38594d9f5011f5d56254caa3bc1ca055373b60202d1ff26e3df5e4737b89102ff789b679f62af7d4a56688dbe795808d07b32d0a19c7ed0a4a0cc119f1d7
7
- data.tar.gz: d5d374374aa984077b7a25780fab917c6a6b198a3b43c03ea995893bdf9dfb62c50b6423f601e4ed2f696030d6d6cf0054f5ae8f417126ad5bd02cd67c7a10f3
6
+ metadata.gz: ae9edfb5fd7365b12e80a674154057677d9df1569bb34a4b4ac944baff014b2e7996af52c0dd1bf1c67fb0b3fae03794d4cb1c63a3bd3413acf06cbb74c902b4
7
+ data.tar.gz: caffef5bf2a357644a584af6ba0a8627283b8737a72f52f2d3b1947743ea295419b626b87889d76e9cec397ce6f4dc3ee00f6e8fba4dc136ce3ef74a033c67dc
@@ -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 = '2.1.3'
3
+ VERSION = '2.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecm_cms2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-27 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails