Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setting / changing rails configuration values after initialization

I recently introduced a bug that only rears its head in development due to cache_classes being set to false. I'd like to write a test to ensure that doesn't happen again, and I am trying to do so by setting cache_classes to false at the beginning of the test. Is there any way to change this, or any other config value, after initialization?

A second, somewhat related question: If I wanted to see the value of cache_classes (or, again, any other config value) in the console, how would I go about doing that?

like image 662
Big Bird Avatar asked May 01 '26 09:05

Big Bird


1 Answers

[$]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
like image 158
Nicolas Blanco Avatar answered May 03 '26 21:05

Nicolas Blanco