Skip to content

Instantly share code, notes, and snippets.

@paul
Created October 9, 2008 18:36
Show Gist options
  • Save paul/15838 to your computer and use it in GitHub Desktop.
Save paul/15838 to your computer and use it in GitHub Desktop.
POSTing this JSON document to /configurations:
{
"name": "lacquered",
"notes": "...",
"parent_configuration_href": "http://config.ssbe.localhost/configurations/90"
}
parent_configuration_href references another configuration in this application.
Our URIs are opaque, so href is the only a client is allowed to reference it.
I'd like to de-munge this into a "parent_id" in params:
{"configuration"=>{"name"=>"lacquered",
"notes"=>"...",
"parent_id"=>90},
"format"=>nil, "action"=>"create", "controller"=>"configurations"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment