2017-02-02 45 views
0

我收到以下錯誤的:在`head`狀態選項已被棄用on Rails的5

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認證,所以我懷疑這個代碼隨之而來。有關如何重寫這個的任何建議?

回答