Skip to content

Commit

Permalink
Merge pull request #221 from namangupta01/csrf
Browse files Browse the repository at this point in the history
Fixed invalid authenticity_token error
  • Loading branch information
hennevogel authored Mar 26, 2018
2 parents 5881d61 + a229edb commit 5241769
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/projects/_like_toggle.js.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
$("#like-<%= @project.id %>").toggle();
$("#dislike-<%= @project.id %>").toggle();
$('input[name="authenticity_token"]').val('<%= form_authenticity_token %>');
$('meta[name="csrf-token"]').attr('content','<%= form_authenticity_token %>');

0 comments on commit 5241769

Please sign in to comment.