consider_all_requests_localについて調べてみる
公開日:
:
最終更新日:2014/01/27
Ruby on Rails
記事内に広告を含む場合があります。記事内で紹介する商品を購入することで、当サイトに売り上げの一部が還元されることがあります。
% vim development.rb
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false
config.action_view.debug_rjs = true
% find /opt/local/lib/ruby -name "*.rb" | xargs grep "consider_all_requests_local"
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb: @@consider_all_requests_local = true
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/base.rb: cattr_accessor :consider_all_requests_local
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb: if consider_all_requests_local || local_request?
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb: @@consider_all_requests_local = true
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/base.rb: cattr_accessor :consider_all_requests_local
/opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.6/lib/action_controller/rescue.rb: if consider_all_requests_local || local_request?
% vim /opt/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_controller/rescue.rb
def rescue_action(exception)
log_error(exception) if logger
erase_results if performed?
if consider_all_requests_local || local_request?
rescue_action_locally(exception)
else
rescue_action_in_public(exception)
end
end
ここで使ってるのかあ。