Merge branch 'master' of github.com:fetsite/fetsite

Conflicts:
	app/controllers/application_controller.rb
This commit is contained in:
Andreas Stephanides
2014-11-10 20:23:47 +01:00
2 changed files with 8 additions and 1 deletions

View File

@@ -22,6 +22,7 @@
stored_location_for(resource) || root_path
end
end
rescue_from CanCan::AccessDenied do |exception|
if user_signed_in?
@@ -37,6 +38,7 @@
end
def get_theme
if ThemesForRails.available_theme_names.include?(params[:theme])
params[:theme]

View File

@@ -1,8 +1,13 @@
<%= content_for :header do %>
<title>Fetsite - <%= @neuigkeit.title %> (<%= @neuigkeit.rubrik.name %>)</title>
<% 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,:theme=>nil),
:image => picture_url.to_s,
:title => @neuigkeit.title.to_s + " (" + @neuigkeit.rubrik.name.to_s + ")",
:type => "article",
:description =>@neuigkeit.text_first_words,