If the goal of this post is to change the functionality of `:format` to return "xml.zip", then I disagree. "xml.zip" is not a file extension, which I believe the `:format` param is intended to represent. Looking at the list of file formats<http://en.wikipedia.org/wiki/List_of_file_formats_(alphabetical)>, it is not on the list -- only "zip" is because it is still a zip file despite the "xml" preceding it.
This is the same as saying that "tar.gz" is a file extension -- it's not. The "tar" before the "gz" indicates that this gzipped file probably contains a tar file, but the extension is still "gz". That's probably why the "tgz" file format was introduced. Just my 2 cents. On Saturday, August 4, 2012 1:33:44 PM UTC-4, Alexey wrote: > > Hello, > > would it be ok to allow formats with a dot in routing requests, like "` > http://example.com/users.xml.zip` <http://example.com/users.xml.zip>"? > > If i am not mistaken, in this situation rails is only trying to match > "zip" for format. I doubt many people are using such routes now because > the controller part is not correctly recognized and the route is not > matched automatically at all, so this change should not break many > applications. > > I can think about a PR if i have time, i would appreciate an indication > which source file to look at. > > I understand that formats with a dot may have other issues, but i do not > think they are serious: > > ```ruby > respond_to do |format| > format.public_send(:'xml.zip') { render :'xml.zip' => @users} > end > ``` > > What do you think? > > - Alexey Muranov. > -- 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/-/yos64d2w_JgJ. 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.
