Skip to content

Commit dadf171

Browse files
authored
Merge pull request rails#45508 from malis/patch-3
Reading form's method by getAttribute instead of form.method
2 parents 0f7b27c + 646bff6 commit dadf171

File tree

1 file changed

+1
-1
lines changed
  • actionview/app/assets/javascripts/rails-ujs/features

1 file changed

+1
-1
lines changed

actionview/app/assets/javascripts/rails-ujs/features/remote.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Rails.handleRemote = (e) ->
2727
if matches(element, Rails.formSubmitSelector)
2828
# memoized value from clicked submit button
2929
button = getData(element, 'ujs:submit-button')
30-
method = getData(element, 'ujs:submit-button-formmethod') or element.method
30+
method = getData(element, 'ujs:submit-button-formmethod') or element.getAttribute('method') or "get"
3131
url = getData(element, 'ujs:submit-button-formaction') or element.getAttribute('action') or location.href
3232

3333
# strip query string if it's a GET request

0 commit comments

Comments
 (0)