On Saturday, August 4, 2012 9:24:28 PM UTC+2, Nicolás Sanguinetti wrote: > > > But then you'd have 'csv.zip', 'xml.zip', etc be application/zip. > > If you want to support both in a controller action, what happens when > someone requests /users with Accept application/zip? Which one wins? > > The .format notation is just a workaround for things that can't add/change > the Accept header to the request (like HTML links), but it's just a > workaround. > > Cheers, > -foca >
I know nothing about Accept header. Since it needs a workaround, i prefer not to rely on it too much. I see no problem that all 'txt.zip', 'xml.zip', 'csv.zip' have the same Content-Type. This means they all should be accepted if Accept header is application/zip, the one with the correct 'format' should be rendered. - Alexey. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-core/-/qOPinbS5ZiwJ. 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-core?hl=en.
