7
我正在升級應用程序從rails 3.something到rails 5.出於某種原因,我正在獲取undefindied方法respond_to任何時候我在我的任何控制器中使用該方法。這是以前工作,我希望有人在這裏可以幫助。未定義的方法respond_to Rails 5控制器
class StatusController < ApplicationController
#this throws an error 'undefined method respond_to
respond_to :json, :html
end
您必須將'gem'responders''添加到您的Gemfile中。 – Aetherus
請參閱http://stackoverflow.com/questions/35983628/undefined-instance-method-respond-to-in-rails-5-api-controller – nikkypx