Skip to content

Instantly share code, notes, and snippets.

@BenKanouse
Created March 12, 2018 15:07
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 BenKanouse/9ba5286d567b009d577ec8a790985d79 to your computer and use it in GitHub Desktop.
Save BenKanouse/9ba5286d567b009d577ec8a790985d79 to your computer and use it in GitHub Desktop.
Jbuilder.encode do |json|
json.foo_bar 1
end
=> "{\"foo_bar\":1}"
# What do I do if I want there to be a dot between foo and bar?
=> "{\"foo.bar\":1}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment