Browse files

move article method in admin feedback controller to prepare a extract…

… of it
  • Loading branch information...
1 parent 0549c06 commit c9a7b524ff734261d3690451d1f6d8a8de7c9038 Yannick Francois committed Jan 6, 2013
Showing with 12 additions and 12 deletions.
  1. +12 −12 app/controllers/admin/feedback_controller.rb
View
24 app/controllers/admin/feedback_controller.rb
@@ -45,18 +45,6 @@ def index
end
@feedback = Feedback.where(conditions).order('feedback.created_at desc').page(params[:page]).per(this_blog.admin_display_elements)
end
-
- def article
- @article = Article.find(params[:id])
- if params[:ham] && params[:spam].blank?
- @feedback = @article.comments.ham
- end
- if params[:spam] && params[:ham].blank?
- @feedback = @article.comments.spam
- end
- @feedback ||= @article.comments
- end
-
def destroy
@record = Feedback.find params[:id]
@@ -115,6 +103,18 @@ def update
end
end
+ def article
+ @article = Article.find(params[:id])
+ if params[:ham] && params[:spam].blank?
+ @feedback = @article.comments.ham
+ end
+ if params[:spam] && params[:ham].blank?
+ @feedback = @article.comments.spam
+ end
+ @feedback ||= @article.comments
+ end
+
+
def change_state
return unless request.xhr?

0 comments on commit c9a7b52

Please sign in to comment.