I have a controller with the following layout logic
layout 'sessions', :except => :privacy
layout 'static', :only => :privacy
The issue is that Rails seems to ignore the first line of code and the layout “sessions” is not applied for any actions. It simply thinks to render the static layout for privacy and no layout for the rest.
Anyone know how to fix this?
Another option is to define a method for your layout call, like so:
and then
However this is really only useful when you want to determine the layout at runtime based on some runtime parameter (like a variable being set). In your example, that does not seem to be necessary.