I'm using Rails 2.3.3.
I'm working with some custom formats (*.rtml.erb) which behave
very similarly to HTML. I understand that my use case is, at best,
a niche and that the standard way to use non-HTML formats is for
XML, JSON, etc.
This may come down to semantics, but I expected Rails to
"remember" my params[:format] value when I called url_for(:action
=> "some_other_action"). However, instead of ending up with
/controller/action/id.rtml, I got the standard
/controller/action/id.
For my own project, I've simply extended
ActionController::Base#url_for to call
super(options.reverse_merge(:format => params[:format])), which
affected ActionView::Helpers::UrlHelpers#url_for due to its
reliance on the former, but IMHO it makes more sense for Rails to
do this on its own.
I'm familiar with XML, JSON, etc., but I'm not so familiar with
the use cases under which these would reference other URLs. So, if
this suggestion makes no sense, just say so. :) But from my own
point of view, it would have been far more intuitive if Rails had
picked up on my format automatically. As I see it (again, I may be
naive in this respect), an .html file is more likely to reference
another .html file, and an .xml file is more likely to reference
another .xml file.