From c84fc93f9fc36b324fc6b5dc8af26d6942b45478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20FRERE?= Date: Wed, 1 Apr 2015 16:45:28 +0200 Subject: =?UTF-8?q?Corrige=20un=20bug=20emp=C3=AAchant=20la=20mise=20?= =?UTF-8?q?=C3=A0=20jour=20des=20Post=20en=20espagnol,=20parfois?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/refinery/blog/admin/posts_controller.rb | 2 +- app/models/refinery/blog/post.rb | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'app') diff --git a/app/controllers/refinery/blog/admin/posts_controller.rb b/app/controllers/refinery/blog/admin/posts_controller.rb index 4eeffd0..04690fe 100644 --- a/app/controllers/refinery/blog/admin/posts_controller.rb +++ b/app/controllers/refinery/blog/admin/posts_controller.rb @@ -93,7 +93,7 @@ module Refinery protected def find_post - @post = Refinery::Blog::Post.find_by_slug_or_id(params[:id]) + @post = Refinery::Blog::Post.find(params[:id]) end def find_all_categories diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb index c64c8f2..d05cb14 100644 --- a/app/models/refinery/blog/post.rb +++ b/app/models/refinery/blog/post.rb @@ -76,14 +76,6 @@ module Refinery .readonly(false) end - def find_by_slug_or_id(slug_or_id) - if slug_or_id.friendly_id? - friendly.find(slug_or_id) - else - find(slug_or_id) - end - end - def by_month(date) newest_first.where(:published_at => date.beginning_of_month..date.end_of_month) end -- cgit v1.2.3