On 23 Sep 2008, at 10:32, FM wrote:
> > Hi everybody, > > so I came out with the following solution: > > 1) I setup a before_filter that checks if the submitted entity has the > "application/atom+xml" content type > 2) If this is the case, I parse the entity and I populate accordingly > the params hash in order to map the information contained in the atom > entry to my model > 3) I put respond_to atom where needed in order to handle atom entry > submissions. > > Is this solution good? > I think it is, but since I am a newbie to Rails, I would appreciate > some experts' opinions. > I think you could tidy this up a little - There is a way of telling rails 'if the content-type is x then use this to parse the request parameters' You just do something along the lines of ActionController::Base.param_parsers[some_mime_type] = Proc.new do | data| # do something with data and turn it into a hash end > Thanks. > > -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 -~----------~----~----~----~------~----~------~--~---

