You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `jquery-datatables-rails` gem is listed as a convenience, to ease adding
48
+
jQuery dataTables to your Rails project. You can always add the plugin assets
49
+
manually via the assets pipeline. If you decide to use the `jquery-datatables-rails` gem, please refer to its installation instructions [here](https://github.com/rweng/jquery-datatables-rails).
50
+
47
51
## Usage
48
52
*The following examples assume that we are setting up rails-datatables for an index of users from a `User` model*
49
53
@@ -187,10 +191,10 @@ Finally, the javascript to tie this all together. In the appropriate `js.coffee`
187
191
```coffeescript
188
192
$->
189
193
$('#users-table').dataTable
190
-
bProcessing:true
191
-
bServerSide:true
192
-
sAjaxSource:$('#users-table').data('source')
193
-
sPaginationType:'full_numbers'
194
+
processing:true
195
+
serverSide:true
196
+
ajax:$('#users-table').data('source')
197
+
pagingType:'full_numbers'
194
198
# optional, if you want full pagination controls.
195
199
# Check dataTables documentation to learn more about
196
200
# available options.
@@ -202,10 +206,10 @@ or, if you're using plain javascript:
202
206
203
207
jQuery(document).ready(function() {
204
208
$('#users-table').dataTable({
205
-
'bProcessing':true,
206
-
'bServerSide':true,
207
-
'sAjaxSource':$('#users-table').data('source'),
208
-
'sPaginationType':'full_numbers',
209
+
"processing":true,
210
+
"serverSide":true,
211
+
"ajax":$('#users-table').data('source')
212
+
"pagingType":"full_numbers",
209
213
// optional, if you want full pagination controls.
210
214
// Check dataTables documentation to learn more about
0 commit comments