【发布时间】:2017-06-19 17:19:34
【问题描述】:
我收到以下错误
DEPRECATION WARNING: The :status option on `head` has been deprecated and will be removed in Rails 5.1. Please pass the status as a separate parameter before the options, instead.
在以下情况下使用:
def options
head :status => 200, :'Access-Control-Allow-Headers' =>
'accept, content-type, Authorization, cache-control, x-requested-with'
end
该应用程序使用devise 进行身份验证,所以我怀疑这个代码是随之而来的。关于如何重写这个有什么建议吗?
【问题讨论】:
标签: ruby-on-rails devise ruby-on-rails-5