FIX: Twitter tags were using `property` instead of `name`.

This commit is contained in:
Robin Ward 2013-03-15 15:42:21 -04:00
parent 87b950fc49
commit dd5885bf12
1 changed files with 2 additions and 2 deletions

View File

@ -42,12 +42,12 @@ module ApplicationHelper
# Add opengraph tags
result = tag(:meta, property: 'og:site_name', content: SiteSetting.title) << "\n"
result << tag(:meta, property: 'twitter:card', content: "summary")
result << tag(:meta, name: 'twitter:card', content: "summary")
[:image, :url, :title, :description].each do |property|
if opts[property].present?
escape = (property != :image)
result << tag(:meta, {property: "og:#{property}", content: opts[property]}, nil, escape) << "\n"
result << tag(:meta, {property: "twitter:#{property}", content: opts[property]}, nil, escape) << "\n"
result << tag(:meta, {name: "twitter:#{property}", content: opts[property]}, nil, escape) << "\n"
end
end