We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 148571d + c50b05a commit 75f7094Copy full SHA for 75f7094
src/rails.js
@@ -181,8 +181,8 @@
181
var href = rails.href(link),
182
method = link.data('method'),
183
target = link.attr('target'),
184
- csrfToken = $('meta[name=csrf-token]').attr('content'),
185
- csrfParam = $('meta[name=csrf-param]').attr('content'),
+ csrfToken = rails.csrfToken(),
+ csrfParam = rails.csrfParam(),
186
form = $('<form method="post" action="' + href + '"></form>'),
187
metadataInput = '<input name="_method" value="' + method + '" type="hidden" />';
188
0 commit comments