diff --git a/app/controllers/artist_commentaries_controller.rb b/app/controllers/artist_commentaries_controller.rb index 59fb1feff..579def6f1 100644 --- a/app/controllers/artist_commentaries_controller.rb +++ b/app/controllers/artist_commentaries_controller.rb @@ -11,7 +11,7 @@ class ArtistCommentariesController < ApplicationController @artist_commentary = ArtistCommentary.create(params[:artist_commentary]) end - respond_with(@artist_commentary.post) + respond_with(@artist_commentary) end def revert diff --git a/app/views/artist_commentaries/_form.html.erb b/app/views/artist_commentaries/_form.html.erb index dc3ee1f47..de623cf18 100644 --- a/app/views/artist_commentaries/_form.html.erb +++ b/app/views/artist_commentaries/_form.html.erb @@ -1,6 +1,6 @@

If the artist of this image posted some interesting additional information about this work, you can copy it here.

-<%= form_tag(create_or_update_artist_commentaries_path, :class => "simple_form", :method => :put) do %> +<%= form_tag(create_or_update_artist_commentaries_path(:format => :js), :remote => true, :class => "simple_form", :method => :put) do %>
<%= hidden_field :artist_commentary, :post_id, :value => @post.id %> diff --git a/app/views/artist_commentaries/create_or_update.js.erb b/app/views/artist_commentaries/create_or_update.js.erb new file mode 100644 index 000000000..345366b9b --- /dev/null +++ b/app/views/artist_commentaries/create_or_update.js.erb @@ -0,0 +1 @@ +location.reload();