在暂存中引发禁止属性错误
Raise forbidden attributes error in staging
是否可以配置 Rails 4 应用程序以在登台时引发 ActionController::UnpermittedParameters
错误?如果是这样,该怎么做?
可以通过更改环境文件中的 config.action_controller.action_on_unpermitted_parameters
属性 来更改此行为。如果设置为 :log
将记录不允许的属性,如果设置为 :raise
将引发异常。
是否可以配置 Rails 4 应用程序以在登台时引发 ActionController::UnpermittedParameters
错误?如果是这样,该怎么做?
可以通过更改环境文件中的 config.action_controller.action_on_unpermitted_parameters
属性 来更改此行为。如果设置为 :log
将记录不允许的属性,如果设置为 :raise
将引发异常。