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

30-Jun-2023 631
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.
Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle