Hi all,

I have the following scenario: I scaffolded a resource R and in the
generated create method I have the code that responds to html and xml.
Basically by POSTing to the URI I can create entities either via forms
or via XML (where basically the tags have the same names of the
underlying model's fields)

The create method's body does this: @r = R.new(params[:r]), and it
works because Rails magically populates the params hash with the data
coming from the request (i.e., from the html form's field or from the
XML content)

Now the question is: what if I want to use another format to
communicate this data?
In particular, what if I want to use an ATOM entry to tell the web app
what data I want to put into the newly created resource of type R?

In this case I would need to transfer the information contained in my
ATOM entry XML to the params has so that everything will work
correctly.

What's the best way to achieve this?

Thanks and sorry if this is basic stuff.

Cheers,
FM

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to