Using a different layout for just one action in controller

In the controller:

layout :layout_a, :except => :fred
layout :layout_b, :only => fred

Michael

Ugly, but use the method version of layout:

  layout :standard_or_remote
  def standard_or_remote(controller)
    if controller.action_name == 'view'
      'remote'
    else
      'standard'
    end
  end

Don't forget:

def standard_or_remote(controller)
  controller.action_name == 'view' ? 'remote' : 'standard'
end