From 0308eeaa47a7393c4a1c244ef756fe51975d66f4 Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 8 Nov 2014 11:07:55 +0100 Subject: [PATCH 1/2] fix picture url --- app/views/neuigkeiten/show.html.erb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/neuigkeiten/show.html.erb b/app/views/neuigkeiten/show.html.erb index 5d0c218..1b3c444 100755 --- a/app/views/neuigkeiten/show.html.erb +++ b/app/views/neuigkeiten/show.html.erb @@ -1,8 +1,13 @@ <%= content_for :header do %> Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>) <% set_meta_tags :author => fetprofile_path(@neuigkeit.author.fetprofile) unless @neuigkeit.author.fetprofile.nil? %> +<% unless @neuigkeit.picture.url.nil? + picture_url=URI(root_url) + picture_url.path=@neuigkeit.picture.url +end +%> <% set_meta_tags :og => { - :image => image_url(@neuigkeit.picture.to_s), + :image => picture_url.to_s, :title => @neuigkeit.title.to_s + " (" + @neuigkeit.rubrik.name.to_s + ")", :type => "article", :description =>@neuigkeit.text_first_words, From 9f61769425e411da7897711c45be8f47474ddaad Mon Sep 17 00:00:00 2001 From: Andreas Stephanides Date: Sat, 8 Nov 2014 11:17:53 +0100 Subject: [PATCH 2/2] app controller --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 00908b1..66ed1b6 100755 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -21,7 +21,7 @@ else stored_location_for(resource) || request.referer || root_path end - end^ + end def get_theme if ThemesForRails.available_theme_names.include?(params[:theme]) params[:theme]