Skip to content

Commit 75f7094

Browse files
committed
Merge pull request #410 from saiqulhaq/master
Refactor handleMethod method
2 parents 148571d + c50b05a commit 75f7094

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rails.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,8 @@
181181
var href = rails.href(link),
182182
method = link.data('method'),
183183
target = link.attr('target'),
184-
csrfToken = $('meta[name=csrf-token]').attr('content'),
185-
csrfParam = $('meta[name=csrf-param]').attr('content'),
184+
csrfToken = rails.csrfToken(),
185+
csrfParam = rails.csrfParam(),
186186
form = $('<form method="post" action="' + href + '"></form>'),
187187
metadataInput = '<input name="_method" value="' + method + '" type="hidden" />';
188188

0 commit comments

Comments
 (0)