开发者

does action_view.cache_template_loading really default to true in rails 2.3.x apps?

开发者 https://www.devze.com 2023-03-14 03:11 出处:网络
according to the rails guides http://guides.rubyonrails.org/2_3_release_notes.html (section 6.8), config.action_view.cache_template_loading defaults to true in production and test.

according to the rails guides http://guides.rubyonrails.org/2_3_release_notes.html (section 6.8), config.action_view.cache_template_loading defaults to true in production and test.

however, when i check the variable Rai开发者_C百科ls.configuration.action_view.cache_template_loading, it gives back a nil value unless i explicitly set it to true.

are the rails guides wrong? if so, i'd like to submit a correction. but wanted to make sure i'm not missing something.

thanks.


ActionView::Resolver.caching? is what you want to check, not Rails.configuration.action_view.cache_template_loading.

https://github.com/rails/rails/blob/4-2-stable/railties/test/application/configuration_test.rb#L795-L831 are the tests for the functionality.

0

精彩评论

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