Module: MetaTags::ControllerHelper
- Defined in:
- lib/meta_tags/controller_helper.rb
Overview
Contains methods to use in controllers.
You can define several instance variables to set meta tags:
@page_title = 'Member Login'
@page_description = 'Member login page.'
@page_keywords = 'Site, Login, Members'
Also you can use #set_meta_tags method, that have the same parameters as ViewHelper#set_meta_tags.
Instance Method Summary collapse
-
#render(*args, &block) ⇒ Object
Processes the
@page_title
,@page_keywords
, and@page_description
instance variables and callsrender
.
Instance Method Details
#render(*args, &block) ⇒ Object
Processes the @page_title
, @page_keywords
, and @page_description
instance variables and calls render
.
17 18 19 20 21 22 23 |
# File 'lib/meta_tags/controller_helper.rb', line 17 def render(*args, &block) [:title] = @page_title if defined?(@page_title) && @page_title [:keywords] = @page_keywords if defined?(@page_keywords) && @page_keywords [:description] = @page_description if defined?(@page_description) && @page_description super end |