Skip to content

Commit

Permalink
Merge pull request #2718 from bitzesty/staging
Browse files Browse the repository at this point in the history
Production release
  • Loading branch information
dreamfall authored Jan 25, 2024
2 parents bbb0bca + f17905d commit b2d5f1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/assets/javascripts/admin/comments.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ ready = ->
e.preventDefault()
$.ajax
url: $(this).attr('action')
headers: 'Content-Type': 'application/json'
data:
authenticity_token: $("meta[name='csrf-token']").attr("content")
type: 'DELETE'
success: () =>
numberWrapper = $(@).closest(".panel").find(".panel-heading .comments-number")
Expand Down
6 changes: 3 additions & 3 deletions app/controllers/admin/comments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def update
log_event if resource.update(update_params)

respond_to do |format|
format.html do
format.html do
render_flash_message_for(resource)
redirect_to([namespace_name, form_answer])
redirect_to([namespace_name, form_answer])
end
format.js { head :ok }
end
Expand All @@ -54,7 +54,7 @@ def destroy

respond_to do |format|
format.json { render(json: :ok)}
format.html do
format.html do
render_flash_message_for(resource)
redirect_to(admin_form_answer_path(form_answer))
end
Expand Down

0 comments on commit b2d5f1b

Please sign in to comment.