Created
July 2, 2014 06:00
-
-
Save mikesorae/b59f1c76798a149a7cfd to your computer and use it in GitHub Desktop.
to_json excluding unneeded column with nested object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts c1.to_json(except: [:created_at, :updated_at], include: {items: {except: [:created_at, :updated_at]}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment