Forum: Ruby on Rails ajax request and html response

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
znz (Guest)
on 2008-11-05 14:01
(Received via mailing list)
Hello,

I wrote some action returns html response rendered with layout.
It is default rendering behavior.

When ajax request and rails 2.0.x, it returns html response rendered
with layout.
But rails 2.1.x, it returns html response without layout.
When ajax request with format=html explicitly, it returns html
response with layout.

Here is sample application patch: http://gist.github.com/22318

Is this expected change?
Kazuhiro NISHIYAMA (Guest)
on 2008-11-06 10:06
(Received via mailing list)
Hello,

In ActionView::Template#set_extension_and_file_name,
set "rhtml" or "erb"(when "html.erb") to @extension.
But @view.template_format is still :js.
This topic is locked and can not be replied to.