meta_manager 0.2.1 → 0.2.2

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: 3ae8c4319588c19c37da506a77b81eb684a172a9
4
- data.tar.gz: 00aced4d9e12eb183920c4631619cae8e49e4751
3
+ metadata.gz: a3cd80ac98c0b65cd37250690a486909c3cead26
4
+ data.tar.gz: 9cd0e104e998f9d87e17e4107ed4cac00e8cf5af
5
5
  SHA512:
6
- metadata.gz: 9fa59902b2f50e30fca61166a3af10f759a8801efb213e0cb75d4d133128da34f14478321cc9d74dad7f57de083ad9b973c6b26b385fabb89a2c8bf25f9d3b3e
7
- data.tar.gz: 66f67c1ad24056c47d84bf6a0f5c4693f0211a682d1b4a03f7b1903d4dc2a97ecc655aedb6a836dfacf6955200bac95078b9fa241e2e5e0451efa18889d95d58
6
+ metadata.gz: f1b62e285426949d49d148edbcd5c136982ee00b702ef4077c77a75e26db5402c6b07a853e0e172f0eae2d780bfa63f8a014cce350e845628d66a82a900ceacd
7
+ data.tar.gz: 7eb3d92a81c6570e2cc21d375e4aa410e4ffa71382c5ed9dfb50295ffb6c030ca17bd10a76ae8073dc1b0268432d89babe6f367bd77a59ab6e448d5b2e60d178
@@ -15,7 +15,7 @@ module MetaManager
15
15
  get_actual_meta_tags(record, dynamic).each do |meta_tag|
16
16
  unless meta_tag.name == 'title'
17
17
  type = meta_tag.name =~ /og:/ ? 'property' : 'name'
18
- tags << tag(:meta, type => meta_tag.name, :content => meta_tag.get_content(self))
18
+ tags << tag(:meta, type => meta_tag.name, :content => render_meta_tag_content(meta_tag))
19
19
  end
20
20
  end
21
21
 
@@ -28,6 +28,25 @@ module MetaManager
28
28
  meta_tags = get_actual_meta_tags(record, dynamic)
29
29
  meta_tags.detect{|t| t.name == 'title'}.try(:get_content, self) || get_page_title(record, options)
30
30
  end
31
+
32
+ protected
33
+
34
+ # Call render_meta_tag_content_description if method exists
35
+ # Controller:
36
+ # protected
37
+ #
38
+ # def render_meta_tag_content_description(meta_tag)
39
+ # if !params[:page].blank? && params[:page] != '1'
40
+ # meta_tag.content += " - page #{params[:page].to_i}"
41
+ # end
42
+ # end
43
+ #
44
+ def render_meta_tag_content(meta_tag)
45
+ method_name = "render_meta_tag_content_#{meta_tag.name}".to_sym
46
+ send(method_name, meta_tag) if respond_to?(method_name, true)
47
+
48
+ meta_tag.get_content(self)
49
+ end
31
50
 
32
51
  private
33
52
 
@@ -1,3 +1,3 @@
1
1
  module MetaManager
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Galeta
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-25 00:00:00.000000000 Z
11
+ date: 2014-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: orm_adapter