Skip to content

Instantly share code, notes, and snippets.

@mikesorae
Created July 2, 2014 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikesorae/b59f1c76798a149a7cfd to your computer and use it in GitHub Desktop.
Save mikesorae/b59f1c76798a149a7cfd to your computer and use it in GitHub Desktop.
to_json excluding unneeded column with nested object
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