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
Copy file name to clipboardExpand all lines: README.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,20 @@ for this gem. If you'd be interested in contributing to speed development,
43
43
please [open an issue](https://github.com/antillas21/ajax-datatables-rails/issues/new)
44
44
and get in touch.
45
45
46
+
47
+
## Breaking changes
48
+
49
+
**Warning:** the v0.4 version is a **major break** from v0.3. The core has been rewriten to remove dependency on Kaminari (or WillPaginate).
50
+
51
+
It also brings a new (more natural) way of defining columns, based on hash definitions (and not arrays) and add some filtering options for column search. [See below](#customize-the-generated-datatables-class) for more infos.
52
+
53
+
To migrate on the v0.4 you'll need to :
54
+
55
+
* update your DataTables classes to remove all the `extend` directives
56
+
* switch to hash definitions of `view_columns`
57
+
* update your views to declare your columns bindings ([See here](#wire-up-the-javascript))
58
+
59
+
46
60
## Installation
47
61
48
62
Add these lines to your application's Gemfile:
@@ -385,10 +399,9 @@ $ ->
385
399
ajax:$('#users-table').data('source')
386
400
pagingType:'full_numbers'
387
401
columns: [
388
-
{data:'id'}
389
-
{data:'name'}
390
-
{data:'phone'}
391
-
{data:'address'}
402
+
{data:'first_name'}
403
+
{data:'last_name'}
404
+
{data:'bio'}
392
405
]
393
406
# pagingType is optional, if you want full pagination controls.
394
407
# Check dataTables documentation to learn more about
0 commit comments