Skip to content

Commit 4076bef

Browse files
committed
Updated readme examples
1 parent bb910b2 commit 4076bef

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -787,14 +787,20 @@ $ ->
787787
$('#posts-datatable').dataTable
788788
ajax:
789789
url: $('#posts-datatable').data('source')
790+
contentType: 'application/json'
790791
type: 'POST'
792+
data: (d) ->
793+
JSON.stringify d
791794
# ...others options, see [here](#5-wire-up-the-javascript)
792795

793796
$ ->
794797
$('#users-datatable').dataTable
795798
ajax:
796799
url: $('#users-datatable').data('source')
800+
contentType: 'application/json'
797801
type: 'POST'
802+
data: (d) ->
803+
JSON.stringify d
798804
# ...others options, see [here](#5-wire-up-the-javascript)
799805
```
800806

0 commit comments

Comments
 (0)