diff --git a/src/rails.js b/src/rails.js index 40223c0b..a870ce0a 100644 --- a/src/rails.js +++ b/src/rails.js @@ -159,9 +159,10 @@ handleMethod: function(link) { var href = link.attr('href'), method = link.data('method'), + target = link.attr('target') || "", // to pass along any original 'target' attribute to the form tag csrf_token = $('meta[name=csrf-token]').attr('content'), csrf_param = $('meta[name=csrf-param]').attr('content'), - form = $('
'), + form = $('
'), metadata_input = ''; if (csrf_param !== undefined && csrf_token !== undefined) {