Rails.env.local? in Rails 7.1 | Saeloun Blog
30-Jun-2023 667
Rails 7.1 also introduced a feature to disable auto-completion in Rails console by default on production.This is useful when we are working with a large Rails application and the auto-completion is slow especially when connecting remotely to the console.Previously, this auto-completion was disabled with Rails.env.production? check to not run only in production.But that meant it was still enabled and made things slower or introduced issues with auto-completion in staging or other environments.With this change, auto-completion is disabled by default, only if the environment is development or test, leveraging the new Rails.env.local? method.
Rails.env.local? in Rails 7.1 | Saeloun Blog #ruby #rubydeveloper #rubyonrails #Rails.env.local? #Rails #Saeloun #blog https://rubyonrails.ba/link/rails-env-local-in-rails-7-1-saeloun-blog