In rails 4.2 respond_with has been moved out of core into the responders gem.
Beta release notes.
respond_with has moved out and into its own proper home with the responders gem.
Can someone please explain why? What makes the responders gem its proper home? What is wrong with it staying in the Rails gem?
Rationale from David Heinemeier Hansson (creator of Ruby on Rails):
I'd like to take this opportunity to split respond_with/class-level respond_to into an external plugin. I'm generally not a fan of the code that comes out of using this pattern. It encourages model#to_json and it hides the difference between HTML and API responses in ways that convolute the code.
So how about we split this into a gem for 4.2, with the current behavior, but also with an option to get the new behavior as suggested here through a configuration point.
Full discussion at this link:
https://github.com/rails/rails/pull/12136#issuecomment-50216483
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With