From 06d7a762b42faab101f026a6fec3c5477a6de84e Mon Sep 17 00:00:00 2001 From: Sherri Mitchell Date: Thu, 15 Sep 2016 14:14:08 -0400 Subject: [PATCH] Fixes an issue with canonical urls for sharing with Facebook and other social media sites --- app/views/layouts/application.html.haml | 2 +- app/views/proposal/show.html.haml | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 355edc46..7f8ca0b7 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -5,7 +5,7 @@ %title= content_for?(:title) ? yield(:title) : (ENV['OSEM_NAME'] || 'OSEM') %meta{:content => "", :name => "description"} %meta{:content => "", :name => "author"} - %meta= content_for?(:head) ? yield(:head) : ('') + = content_for?(:head) ? yield(:head) : ('') = stylesheet_link_tag "application", :media => "all" = javascript_include_tag "application" diff --git a/app/views/proposal/show.html.haml b/app/views/proposal/show.html.haml index 2e0edc7d..2fe197ae 100644 --- a/app/views/proposal/show.html.haml +++ b/app/views/proposal/show.html.haml @@ -1,9 +1,10 @@ - content_for :head do - %meta{ :property => 'og:title', :content => @conference.title } - %meta{ :property => 'og:image', :content => @conference.picture_url } - %meta{ :property => 'og:url', :content => conference_path(@conference.short_title) } - %meta{ :property => 'og:description', :content => @conference.description } - %meta{ :property => 'og:site_name', :content => (ENV['OSEM_NAME'] || 'OSEM') } + %meta{ :property => "og:title", :content => @event.title } + %meta{ :property => "og:url", :content => conference_program_proposal_url(@conference.short_title, @event) } + %meta{ :property => "og:description", :content => @conference.description } + %meta{ :property => "og:site_name", :content => (ENV['OSEM_NAME'] || 'OSEM') } + - @conference[:picture] + %meta{property: "og:image:secure_url", content: @conference.picture_url} .container .row