Rails.env.local? in Rails 7.1 | Saeloun Blog

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 #blog https://rubyonrails.ba/single/rails-env-local-in-rails-7-1-saeloun-blog

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles