Skip to content

Commit 79de881

Browse files
committed
Fix the remoteSubmission global example
1 parent 35dfb15 commit 79de881

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,11 @@ Any functions that need to be accessible in the global scope should be defined i
9292
window.App ||= {}
9393

9494
App.remoteSubmission = ($form) ->
95-
$.ajax
95+
return $.ajax
9696
url: $form.attr('action')
9797
type: $form.attr('method')
9898
data: $form.serialize()
9999
dataType: 'json'
100-
101-
return
102100
```
103101

104102
Now you can access this function from anywhere in the application by just calling ```App.remoteSubmission($('#myForm'))```

0 commit comments

Comments
 (0)