Fix mode menu 'approve' option.

* Fix routing error in respond_with (didn't use /moderator namespace).

* Fix /moderator/posts/approvals.json response to return full
  PostApproval object, not just a success/failure message.

* Simplify the javascript a bit (use $.post instead of $.ajax).
This commit is contained in:
evazion
2017-06-04 12:14:35 -05:00
parent 4fe97a8218
commit fdf8e7d5d7
3 changed files with 13 additions and 19 deletions

View File

@@ -9,7 +9,7 @@ module Moderator
cookies.permanent[:moderated] = Time.now.to_i
post = ::Post.find(params[:post_id])
@approval = post.approve!
respond_with(@approval)
respond_with(:moderator, @approval)
end
end
end