Reputation: 1092
I'm upgrading an app from rails 3.something to rails 5. For some reason, I'm am getting undefindied method respond_to anytime I use that method in any of my controllers. This was working before and I was hoping someone here could help.
class StatusController < ApplicationController
#this throws an error 'undefined method respond_to
respond_to :json, :html
end
Upvotes: 13
Views: 9466
Reputation: 1416
As per Rails 5 release notes,
Remove respond_to/respond_with placeholder methods, this functionality has been extracted to the responders gem.
Add responders
gem to your Gemfile.
Upvotes: 24