B
B
Bogdan2017-08-16 16:30:26
Ruby on Rails
Bogdan, 2017-08-16 16:30:26

Rails console class change auto reload!?

Hello. When using (testing methods in my case) the rails console and changing the class (for example, ApplicationController.rb ), you need to run the reload command in the console! to apply the change. Is there a way to configure it so that when changing the class, do not use this command? everything seems to be configured
in config/development.rb as it should

Rails.application.configure do
  config.cache_classes = false
  config.file_watcher = ActiveSupport::FileUpdateChecker
end

Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Andreev, 2017-08-16
@b0nn1e

- You need to test through tests.
- No way, restart the console. Well, or at least use rails runner "p ApplicationController ....."

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question