From 8bda0d550bd3fb8a1dfc6d11eb4a3d16e949124f Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Sat, 21 Jul 2012 09:25:36 +0200 Subject: [PATCH] image facebook --- app/controllers/public/articles_controller.rb | 1 + app/views/layouts/public.html.haml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/controllers/public/articles_controller.rb b/app/controllers/public/articles_controller.rb index 81d9603..a89fa59 100644 --- a/app/controllers/public/articles_controller.rb +++ b/app/controllers/public/articles_controller.rb @@ -49,6 +49,7 @@ class Public::ArticlesController < ApplicationController if @article and @article.enabled @title = @article.title + @thumbnail_image = @article.image_file.file.large.medium.small.thumb.url if @article.image_file else redirect_to "/", :notice => "La page que vous demandez n'a pas pu être trouvée.

Vous avez donc été redirigé sur notre page d'accueil" diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml index 59d2c13..10926ed 100644 --- a/app/views/layouts/public.html.haml +++ b/app/views/layouts/public.html.haml @@ -8,6 +8,8 @@ =javascript_include_tag "public" = csrf_meta_tag + + = '' if @thumbnail_image