开发者

setting / changing rails configuration values after initialization

开发者 https://www.devze.com 2023-01-23 12:48 出处:网络
I recently introduced a bug that only rears its head 开发者_C百科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

I recently introduced a bug that only rears its head 开发者_C百科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?


[$]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
0

精彩评论

暂无评论...
验证码 换一张
取 消