开发者

setting / changing rails configuration values after initialization

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜