lib/generators/rostra/templates/app/helpers/rostra/application_helper.rb in rostra-0.1.18 vs lib/generators/rostra/templates/app/helpers/rostra/application_helper.rb in rostra-0.1.19
- old
+ new
@@ -11,9 +11,29 @@
# If you want to user helper methods defined elsewhere in your app, you can include them here
# as well. For example:
#
# include MainAppHelper
+ # Used to add meta description tags to rostra pages
+ #
+ # def include_meta_description
+ # description = case "#{controller_name}##{action_name}"
+ # when "questions#show" then @question.title
+ # when "questions#index" then "Recently asked questions"
+ # end
+ # tag(:meta, { :name => "description", :content => description })
+ # end
+
+ # Used to add meta keyword tags to rostra pages
+ #
+ # def include_meta_keywords
+ # keywords = case "#{controller_name}##{action_name}"
+ # when "questions#show" then @question.tag_list.join(', ')
+ # when "questions#index" then "add, some, default, keywords"
+ # end
+ # tag(:meta, { :name => "keywords", :content => keywords })
+ # end
+
# Snippet used to share a question on Twitter.
#
# def twitter_sharing_link
# raw %{
# <a href="https://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>