# Restful controller and xml updates

**URL:** <https://www.ruby-forum.com/t/restful-controller-and-xml-updates/129798>\
**Category:** Rails\
**Created:** [February 21, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/restful-controller-and-xml-updates/129798 "2008-02-21T17:46:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianluca\_t](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/d78d45/32.png) [@gianluca\_t](https://www.ruby-forum.com/u/gianluca_t)\
**Post date:** [February 21, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/restful-controller-and-xml-updates/129798/1 "2008-02-21T17:46:58Z")

</div>

Hi to all the crew,

I cannot figure out if is there a way to create/update an object and its  
associations with a single xml using a restful controller (put or post  
method)

Does anyone know how to handle this task (or tell me which is the best  
solution ?)…

For example:

Role (has many users through LinkUserRole)  
User (has many users through LinkUserRole)  
LinkUserRole (interface)

Now, I know very well how to hanldle the association of user/roles into  
controller for html input but how can I do when I receive an xml ?  
Which elements must be presente into the xml ?

Someone has an example ?

Many thanks in advance…
