diff options
author | Jérémy FRERE <frere.jeremy@gmail.com> | 2015-04-01 16:45:28 +0200 |
---|---|---|
committer | Philip Arndt <git@p.arndt.io> | 2015-05-14 09:54:15 +1200 |
commit | c84fc93f9fc36b324fc6b5dc8af26d6942b45478 (patch) | |
tree | 945c96029afe7927396b4b7545952bf34ec1071c /app | |
parent | 95db4b6299c026a67ad61067b83882b862678be6 (diff) | |
download | refinerycms-blog-c84fc93f9fc36b324fc6b5dc8af26d6942b45478.tar.gz refinerycms-blog-c84fc93f9fc36b324fc6b5dc8af26d6942b45478.tar.bz2 refinerycms-blog-c84fc93f9fc36b324fc6b5dc8af26d6942b45478.zip |
Corrige un bug empêchant la mise à jour des Post en espagnol, parfois
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/refinery/blog/admin/posts_controller.rb | 2 | ||||
-rw-r--r-- | app/models/refinery/blog/post.rb | 8 |
2 files changed, 1 insertions, 9 deletions
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 |