Should I override to_json in my model?
In the “old days”, you’d override to_json in your model class to provide a custom JSON representation. In Rails 3, there’s a better way. And it’s available in 2.3.3 as well! Meet as_json, and why you should never override to_json ever again.
Post a comment