- Adds
:oracle
as supporteddb_adapter
. Thanks to lutechspa for this contribution.
- Changes to the
sortable_columns
andsearchable_columns
syntax as it required us to do unnecessary guessing. New syntax isModelName.column_name
orNamespace::ModelName.column_name
. Old syntax oftable_name.column_name
is still available to use, but prints a deprecation warning. Thanks to M. Saiqul Haq for pointing this. - Adds support to discover from received params if a column should be really considered for sorting purposes. Thanks to Zachariah Clay for this contribution.
- Moves paginator settings to configuration initializer.
- Fix count method to work with select statements under Rails 4.1. Thanks to Jason Mitchell for the contribution.
- Edits to
README
documentation about theoptions
hash. Thanks to Jonathan E Hogue for pointing out that previous documentation was confusing and didn't address its usage properly. - Edits to
README
documentation on complex model queries inside theget_raw_records
method. A round of applause to Zoltan Paulovics for contributing this awesome piece of documentation. 😄 - Adds typecast step to
search_condition
method, so now we support having non-text columns inside thesearchable_columns
array. - Adds support for multi-column sorting and multi-term search. Thanks to Zoltan Paulovics for contributing this feature.
- Adds optional config initializer, so we can have a base to typecast non
text-based columns and perform searches depending on the use of
:mysql2
,:sqlite3
or:pg
. Thanks to M. Saiqul Haq for contributing this feature.
- This version works with jQuery dataTables ver. 1.10 and it's new API syntax.
- Added
legacy
branch to repo. If your project is working with jQuery dataTables ver. 1.9, this is the branch you need to pull, or use the last0.1.x
version of this gem.
- Fixes
where
clause being built even when search term is an empty string. Thanks to e-fisher for spotting and fixing this.
- Fixes problem on
searchable_columns
where the corresponding model is a composite model name, e.g.UserData
,BillingAddress
. Thanks to iruca3 for the fix.
- A fresh start. Sets base class name to:
AjaxDatatablesRails::Base
. - Extracts pagination functions to mixable modules.
- A user would have the option to stick to the base
AjaxDatatablesRails::Extensions::SimplePaginator
or replace it withAjaxDatatablesRails::Extensions::Kaminari
orAjaxDatatablesRails::Extensions::WillPaginate
, depending on what he/she is using to handle record pagination.
- A user would have the option to stick to the base
- Removes dependency to pass in a model name to the generator. This way, the developer has more flexibility to implement whatever datatable feature is required.
- Datatable constructor accepts an optional
options
hash to provide more flexibility. See README for examples. - Sets generator inside the
Rails
namespace. To generate anAjaxDatatablesRails
child class, just execute the generator like this:$ rails generate datatable NAME
.