diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 63a67944b..e47e16fab 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -26,7 +26,9 @@ class PostsController < ApplicationController @post = Post.find(params[:id]) @version = PostVersion.find(params[:version_id]) @post.revert_to!(@version) - respond_with(@post) + respond_with(@post) do |format| + format.js + end end private diff --git a/app/views/post_versions/_listing.html.erb b/app/views/post_versions/_listing.html.erb index 0949a2001..12f1b7343 100644 --- a/app/views/post_versions/_listing.html.erb +++ b/app/views/post_versions/_listing.html.erb @@ -1,5 +1,5 @@
| Post | @@ -8,7 +8,8 @@Rating | Parent | IP Address | -Tags | +Tags | ++ <%= link_to "Revert", revert_post_path(post_version.post_id, :version_id => post_version.id), :method => :put, :remote => true %> + | <% end %> diff --git a/app/views/uploads/show.html.erb b/app/views/uploads/show.html.erb index e761d92e2..eb7273914 100644 --- a/app/views/uploads/show.html.erb +++ b/app/views/uploads/show.html.erb @@ -17,7 +17,7 @@ <% end %>
|---|