Dumping Data as JSON and Field Deprecation in Active Record
Read OriginalThe article details a technical issue encountered when deprecating a field in an ActiveRecord model. While overriding as_json to exclude the deprecated field works for the model itself, it fails when the model is included as an association in another model's JSON output. The post provides the specific code problem and the solution: explicitly excluding the field in the include option.
Comments
No comments yet
Be the first to share your thoughts!
Browser Extension
Get instant access to AllDevBlogs from your browser