I’m using Rails 2.1 with the Multiview template mechanism to create a
hybrid Facebook and public site. For the most part, there are
analogous views across the two. Since Facebook supports a subset of
HTML, some of my HTML views and partials could be shared across the
I have registered a Mime type alias for FBML in my mime_types.rb:
and have a filter in my controller to set it appropriately:
request.format = :fbml
That all seems fine.
I would like to use an FBML template (e.g. “foo.fbml.erb”) if it
exists, but otherwise fall back to an HTML template (e.g.
“foo.html.erb”). I have seen references that it should work like this
but I get “Template is missing” errors if the FBML template is not
It seems to work to name common templates without a format (e.g.
“foo.erb”), which I am doing now, but is there a way to get it to
default back to HTML first?