Skip to content

Instantly share code, notes, and snippets.

@stevef
Created July 29, 2011 00:49
Show Gist options
  • Save stevef/1112913 to your computer and use it in GitHub Desktop.
Save stevef/1112913 to your computer and use it in GitHub Desktop.
Devise breaks to_json, so we must use my_json
def my_json(options={})
obj = {}
obj = to_json(options.merge!(obj))
obj = JSON.parse obj
obj['user']['id'] = id
obj.to_json
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment