@@ -96,16 +96,11 @@ AjaxDatatablesRails.configure do |config|
9696
9797 # Or you can use your rails environment adapter if you want a generic dev and production
9898 # config.db_adapter = Rails.configuration.database_configuration[Rails.env]['adapter'].to_sym
99-
100- # available options for orm are: :active_record, :mongoid
101- # config.orm = :active_record
10299end
103100```
104101
105102Uncomment the ` config.db_adapter ` line and set the corresponding value to your database and gem. This is all you need.
106103
107- Uncomment the ` config.orm ` line to set ` active_record or mongoid ` if included in your project. It defaults to ` active_record ` .
108-
109104#### Note
110105
111106Currently ` AjaxDatatablesRails ` only supports ` ActiveRecord ` as ORM for performing database queries.
@@ -386,7 +381,7 @@ Sometimes you'll need to use view helper methods like `link_to`, `mail_to`,
386381To have these methods available to be used, this is the way to go:
387382
388383``` ruby
389- class UserDatatable < AjaxDatatablesRails ::Base
384+ class UserDatatable < AjaxDatatablesRails ::ActiveRecord
390385 extend Forwardable
391386
392387 # either define them one-by-one
@@ -483,7 +478,7 @@ This way you don't need to inject the `view_context` in the Datatable object to
483478
484479### Pass options to the datatable class
485480
486- An ` AjaxDatatablesRails::Base ` inherited class can accept an options hash at initialization. This provides room for flexibility when required.
481+ An ` AjaxDatatablesRails::ActiveRecord ` inherited class can accept an options hash at initialization. This provides room for flexibility when required.
487482
488483Example:
489484
@@ -497,7 +492,7 @@ def index
497492end
498493
499494# The datatable class
500- class UnrespondedMessagesDatatable < AjaxDatatablesRails ::Base
495+ class UnrespondedMessagesDatatable < AjaxDatatablesRails ::ActiveRecord
501496
502497 # ... other methods (view_columns, data...)
503498
@@ -648,7 +643,7 @@ To enable the date range search, for example `created_at` :
648643
649644### Generator Syntax
650645
651- Also, a class that inherits from ` AjaxDatatablesRails::Base ` is not tied to an
646+ Also, a class that inherits from ` AjaxDatatablesRails::ActiveRecord ` is not tied to an
652647existing model, module, constant or any type of class in your Rails app.
653648You can pass a name to your datatable class like this:
654649
0 commit comments