Class: Seorel::Helper::Generic
- Inherits:
-
Base
- Object
- Base
- Seorel::Helper::Generic
show all
- Defined in:
- lib/seorel/helper/generic.rb
Instance Attribute Summary
Attributes inherited from Base
#params, #request
Instance Method Summary
collapse
Methods inherited from Base
#helpers, #image_url, #initialize, #locale, #render
Instance Method Details
#all ⇒ Object
22
23
24
25
26
27
28
|
# File 'lib/seorel/helper/generic.rb', line 22
def all
[
title_tag,
description_tag,
keywords_tag
].compact
end
|
#description_tag ⇒ Object
13
14
15
|
# File 'lib/seorel/helper/generic.rb', line 13
def description_tag
h.tag :meta, name: 'description', content: params.description
end
|
#keywords_tag ⇒ Object
17
18
19
20
|
# File 'lib/seorel/helper/generic.rb', line 17
def keywords_tag
return if params.keywords.blank?
h.tag :meta, name: 'keywords', content: params.keywords
end
|
#title_tag ⇒ Object
9
10
11
|
# File 'lib/seorel/helper/generic.rb', line 9
def title_tag
h.content_tag :title, title
end
|