ajax-datatables-rails
ajax-datatables-rails copied to clipboard
fix: prevent establishing ActiveRecord connection on startup
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.
Updated the code to use ::ActiveRecord::Base.configurations.configs_for(env_name: Rails.env) instead which is more reliable.
Fix https://github.com/jbox-web/ajax-datatables-rails/issues/388