Setting / changing rail configuration values โ€‹โ€‹after initialization

I recently introduced an error that only raises my head during the development process because cache_classes is set to false. I would like to write a test to make sure this does not happen again, and I'm trying to do this by setting cache_classes to false at the beginning of the test. Is there a way to change this or any other configuration value after initialization?

The second, somewhat related question: if I wanted to see the cache_classes value (or, again, any other configuration value) in the console, how would I do it?

+3
source share
1 answer
[$]nicolas@nicolas-desktop:[git:master] /home/nicolas/project-> rails c
  Loading development environment (Rails 3.0.1)
  ree-1.8.7-2010.02 > Rails.configuration.cache_classes
  false
+2

Source: https://habr.com/ru/post/1772852/


All Articles