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 +4 -4
- data/lib/meta_manager/helper.rb +20 -1
- data/lib/meta_manager/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3cd80ac98c0b65cd37250690a486909c3cead26
|
4
|
+
data.tar.gz: 9cd0e104e998f9d87e17e4107ed4cac00e8cf5af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1b62e285426949d49d148edbcd5c136982ee00b702ef4077c77a75e26db5402c6b07a853e0e172f0eae2d780bfa63f8a014cce350e845628d66a82a900ceacd
|
7
|
+
data.tar.gz: 7eb3d92a81c6570e2cc21d375e4aa410e4ffa71382c5ed9dfb50295ffb6c030ca17bd10a76ae8073dc1b0268432d89babe6f367bd77a59ab6e448d5b2e60d178
|
data/lib/meta_manager/helper.rb
CHANGED
@@ -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
|
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
|
|
data/lib/meta_manager/version.rb
CHANGED
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.
|
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
|
+
date: 2014-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: orm_adapter
|