ajax-datatables-rails icon indicating copy to clipboard operation
ajax-datatables-rails copied to clipboard

fix: prevent establishing ActiveRecord connection on startup

Open milgner opened this issue 3 years ago • 2 comments
trafficstars

Instead of creating a connection and looking at its database adapter, look at the configured adapter instead.

This prevents issues when trying to compile assets or running other rake tasks in RAILS_ENV=production that are supposed to work without a running database.

milgner avatar Feb 23 '22 09:02 milgner

Updated the code to use ::ActiveRecord::Base.configurations.configs_for(env_name: Rails.env) instead which is more reliable.

milgner avatar Feb 23 '22 15:02 milgner

Fix https://github.com/jbox-web/ajax-datatables-rails/issues/388

n-rodriguez avatar Feb 23 '22 22:02 n-rodriguez