Ben Johnson wrote:
> If I specify a layout in a controller:
>
> class MyController < ApplicationController
> layout "some_layout"
> end
>
> Any JS request will use the some_layout. I thought certain requests
> types were exempt from layouts? When I remove the layout call everything
> works perfect, the problem is that it uses the application layout.
>
> Any ideas why this is or how I can fix this?
Is this with a recent version of Rails?
At one time you had to do
layout proc {|controller| 'some_layout' unless controller.request.xhr?}
But if you're doing proper RJS renders, I don't think it's now necessary.
--
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---