If somebody is interested in solution - the easiest way to use properly 
$resource

Task = $resource("/api/todos/:todo_id/tasks/:id", {todo_id: "@todo_id", 
id:"@id"}, {update: {method:"PUT"}})

Task.query([params], success, error)
Task.save([params], postData, success, error)

as example

Task.save({todo_id:1,id:23}, {title:"new task", todo_id:1})

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/111fba216670f6cd1b16e5be4e448c9c%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to