> 
> (2) if I'm correct, and I can't get to that header, then when I create
> a new action with a POST to todos.xml from jquery.ajax, I can't
> actually take someone to the action they've just created, or otherwise
> programatically access it/modify it/etc., since that information is in
> the location header rather than in the data. As I understand best
> practices for POST[1], it would be good to return the URI (or perhaps
> even simpler just the action's ID number?) in the response, not just
> in the header. I'd be much obliged for my little project if someone
> would help that happen in git, or at least point me at the right place
> to make it happen.
> 

Don't know enough about jquery wrt getting to the header. To put the new
url in the body is not that difficult I think. For example in the 
project_controller, I think you can add :text => project_url(@project) to 
line 95 to add the url to the body of the response. But I have not tried
it...

http://github.com/bsag/tracks/blob/2497ea9fea1a7528adb2b41f450f6dfb78a47a8c/
app/controllers/projects_controller.rb#L95 

Reinier 

_______________________________________________
Tracks-discuss mailing list
[email protected]
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss

Reply via email to