rails/rails — Issue #5307: Layout rendered for JavaScript HTML fallback
Author: visoft
Created: 2012-03-06 19:19:39+00:00
State: open

There is a breaking change between Rails 3.2.1 and 3.2.2...

Given the following controller:

```Ruby
class NotesController < ApplicationController
respond_to :html, :js

def new
@note = Note.new
respond_with(@note)
end
end
````

In Rails 3.2.1, if you called the JavaScript format (e.g. `/notes/new.js`), you would have the `new` view rendered without the layout. In Rails 3.2.2, the layout is now generated. I don't believe this was an intended change and is in fact a bug. The change in processing *may* be related to https://github.com/rails/rails/issues/5025, but I haven't spent the time to see if in fact it is part of the issue.