Skip to content

Instantly share code, notes, and snippets.

@spacegauch0
Created December 4, 2013 15:43
Show Gist options
  • Select an option

  • Save spacegauch0/7789766 to your computer and use it in GitHub Desktop.

Select an option

Save spacegauch0/7789766 to your computer and use it in GitHub Desktop.
# This looks pretty uggly
JSON.pretty_generate(JSON.parse(Model.first.to_json(options)))
# but doing this, the pretty_generate method ignores the `options` argument.
JSON.pretty_generate(Model.first.attributes, options)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment