aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/refinery/blog/admin/posts_controller.rb2
-rw-r--r--app/models/refinery/blog/post.rb8
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