Skip to content

Commit

Permalink
tweak ajax datatable rails to resolve an error caused by not being ab…
Browse files Browse the repository at this point in the history
…le to identify the current database adapter.
  • Loading branch information
cmcfadden committed Aug 11, 2021
1 parent 5c1e0e1 commit d6d1d20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
6 changes: 3 additions & 3 deletions config/deploy/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
role :app, %w([email protected])
role :web, %w([email protected])
role :db, %w([email protected])
role :app, %w([email protected])
role :web, %w([email protected])
role :db, %w([email protected])
# role :app, %w([email protected])
# role :web, %w([email protected])
# role :db, %w([email protected])



Expand Down
10 changes: 10 additions & 0 deletions config/initializers/ajax_datatables_rails.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
AjaxDatatablesRails.configure do |config|
# available options for db_adapter are: :pg, :mysql, :mysql2, :sqlite, :sqlite3
# config.db_adapter = :mysql2

# Or you can use your rails environment adapter if you want a generic dev and production
config.db_adapter = Rails.configuration.database_configuration[Rails.env]['adapter'].to_sym

# available options for orm are: :active_record, :mongoid
# config.orm = :active_record
end

0 comments on commit d6d1d20

Please sign in to comment.