canonical tag for posts

This commit is contained in:
Marek 2011-09-11 00:10:07 +02:00
parent 97ad55cbf0
commit 20cffcee84

View file

@ -18,6 +18,7 @@ module Blog
def show
@blog_comment = BlogComment.new
@canonical = url_for(:locale => ::Refinery::I18n.default_frontend_locale) if canonical?
respond_with (@blog_post) do |format|
format.html { present(@blog_post) }
@ -101,5 +102,8 @@ module Blog
@tags = BlogPost.tag_counts_on(:tags)
end
def canonical?
::Refinery.i18n_enabled? && ::Refinery::I18n.default_frontend_locale != ::Refinery::I18n.current_frontend_locale
end
end
end