jbox-web / ajax-datatables-rails

A wrapper around DataTable's ajax methods that allow synchronization with server-side pagination in a Rails app
MIT License
585 stars 228 forks source link

Postgresql and mysql in one rails app #364

Closed keesvandenbos closed 3 years ago

keesvandenbos commented 4 years ago

Hi,

Is it possible to support both pg and mysql in one rails app? I need to use both databases and setting db_adapter only lets me initialize only one of the two?

Many thanks in advance for any help.

n-rodriguez commented 4 years ago

Is it possible to support both pg and mysql in one rails app? I need to use both databases and setting db_adapter only lets me initialize only one of the two?

I don't think it's possible right now...

n-rodriguez commented 3 years ago

Is it possible to support both pg and mysql in one rails app? I need to use both databases and setting db_adapter only lets me initialize only one of the two?

You can now set the db_adapter setting on the datatable class.

See: https://github.com/jbox-web/ajax-datatables-rails#change-the-db-adapter-for-a-datatable-class

Note: this is on master branch and ready to be released soon.