I want to add a different xml format, plist in this case, to my controller for the create action. Using the default scaffold, I can handle the standard AR format. I'd like to be able to have a post to:
POST foos/create.plist [plist formatted object] That means I need to parse the incoming plist and turn it into an AR object. That's not hard, but I'm not sure where to do it, how to route the .plist request, etc. Do I need to create a new content-type handler? Where do I access the POST data? Right now I have some controllers hacked with plist_create actions and I access the raw POST data in env. I'd like it to look like this: def create # This of course requires something under the covers to recognize the .plist request and parse it into params # Where do I do that? @foo = Foo.new(params[:foo]) respond_to do |format| format.plist { render :xml => some_response.to_plist } end end Thanks --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---