From 6d8dd1cc266c9e0d26d7dd8d57a2f63d075f1832 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Tue, 10 Sep 2013 12:20:25 +0200 Subject: [PATCH] routes article --- app/views/public/articles/_article.html.haml | 4 ++-- app/views/public/articles/_sidebar_recents.html.haml | 2 +- config/routes.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/public/articles/_article.html.haml b/app/views/public/articles/_article.html.haml index ad009db..41179ac 100644 --- a/app/views/public/articles/_article.html.haml +++ b/app/views/public/articles/_article.html.haml @@ -27,6 +27,6 @@ =render article.block .socials - =link_to image_tag("t.png"), "http://twitter.com/intent/tweet?source=sharethiscom&text=Blog de Geneviève Gagos : "+article.title+"&url="+article_url(:id => article.slug), :target => "_blank",:title => "partager sur twitter l'article du blog de Geneviève Gagos : "+article.title.to_s - =link_to image_tag("f.png"), "https://www.facebook.com/sharer.php?u="+article_url(:id => article.slug)+"&t=Blog de Geneviève Gagos : "+article.title+"", :target => "_blank",:title => "partager sur facebook l'article du blog de Geneviève Gagos : "+article.title.to_s + =link_to image_tag("t.png"), "http://twitter.com/intent/tweet?source=sharethiscom&text=Blog de Geneviève Gagos : "+article.title+"&url="+public_article_path(:id => article.slug), :target => "_blank",:title => "partager sur twitter l'article du blog de Geneviève Gagos : "+article.title.to_s + =link_to image_tag("f.png"), "https://www.facebook.com/sharer.php?u="+public_article_path(:id => article.slug)+"&t=Blog de Geneviève Gagos : "+article.title+"", :target => "_blank",:title => "partager sur facebook l'article du blog de Geneviève Gagos : "+article.title.to_s \ No newline at end of file diff --git a/app/views/public/articles/_sidebar_recents.html.haml b/app/views/public/articles/_sidebar_recents.html.haml index 2c463b2..faedec7 100644 --- a/app/views/public/articles/_sidebar_recents.html.haml +++ b/app/views/public/articles/_sidebar_recents.html.haml @@ -3,6 +3,6 @@ %h3 Articles récents %ul -Article.recents.limit(5).each do |article| - %li= link_to article.title, article_path(:id => article.slug),:title => "Blog EFT de Geneviève Gagos - "+article.title.to_s + %li= link_to article.title, public_article_path(:id => article.slug),:title => "Blog EFT de Geneviève Gagos - "+article.title.to_s \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 3eb5709..10795d0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -14,7 +14,7 @@ CMSnb::Application.routes.draw do get 'newsletters.html' => "public/newsletters#index", :as => "newsletters" - get 'articles/:id.html' => "public/articles#show", :as => "article" + get 'articles/:id.html' => "public/articles#show", :as => "public_article" get 'articles.html' => "public/articles#index", :as => "articles" get "articles/archives/:year/:month.html"=> "public/articles#archives", :as => :archive_public_article