Skip to content

Commit 76edb79

Browse files
authored
Merge pull request #406 from re-gmbh/master
fix: prevent establishing ActiveRecord connection on startup
2 parents e3a798c + 195be6d commit 76edb79

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ajax-datatables-rails/base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module AjaxDatatablesRails
44
class Base
55

6-
class_attribute :db_adapter, default: ::ActiveRecord::Base.connection.adapter_name.downcase.to_sym
6+
class_attribute :db_adapter, default: ::ActiveRecord::Base.configurations.configs_for(env_name: Rails.env).first.adapter.downcase.to_sym
77
class_attribute :nulls_last, default: false
88

99
attr_reader :params, :options, :datatable

0 commit comments

Comments
 (0)