Skip to content

Commit

Permalink
Fix Authenticity_token bug
Browse files Browse the repository at this point in the history
updates the auth token in the form resolve csrf error
Closes #191
  • Loading branch information
AnkushMalik committed Feb 20, 2018
1 parent dc9bba8 commit ba46151
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/views/markdown/preview.js.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
$('#preview-contents').html("<%=j raw @rendered %>");
$('#loading-spinner').addClass('hidden');
$('#preview-contents').removeClass('hidden');
$('input[name="authenticity_token"]').val('<%= form_authenticity_token %>');

0 comments on commit ba46151

Please sign in to comment.