Don't you think it makes sense to add rxml to the list of exempt
extensions? I'd assume most people would be surprised to see their
XML embedded in the middle of their (most probably) rhtml layout.
http://dev.rubyonrails.org/svn/rails/trunk/actionpack/lib/
action_controller/base.rb:
def template_exempt_from_layout?(template_name =
default_template_name)
template_name =~ /\.rjs$/ ||
(@template.pick_template_extension(template_name) == :rjs rescue false)
end
I've overrided it in my own application.rhtml as below but I'm
thinking that this should probably be the default behaviour.
def template_exempt_from_layout?(template_name =
default_template_name)
super || template_name =~ /\.rxml$/
end
-- tim lucas
rxml is used for more than just XML. It's also used by many for XHTML
where its perfectly reasonable to have and want a layout. rjs on the
other hand is decisively single-purpose, so there we can easily say
that a layout doesn't make sense.