Purpose of “consider_all_requests_local” in config/environments/development.rb?

后端 未结 2 688
礼貌的吻别
礼貌的吻别 2020-12-02 16:16

What is the purpose of this Rails config setting...

config.action_controller.consider_all_requests_local = true

It\'s set to true by defaul

2条回答
  •  悲哀的现实
    2020-12-02 16:46

    At development level we set:

    consider_all_requests_local set = true

    because developer needs to take a look at full error showing layout/view as you can see in the image below.

    But at production level, we don't need to show our internal coding bug so we set false:

    config.consider_all_requests_local = false

提交回复
热议问题