Morph AppSpace - Platform as a Service for RoR

How to exclude an action from the controller’s layout processing

Antonio Cangiano January 11th, 2006

Sometimes you may want to exclude an action from being processed with the controller’s layout. In other words, you may need to use a default layout for all the methods in the controller, except for one of them.

A quick way to do this is:

class MyController < ApplicationController
  layout "mycontroller", :except => :myaction


If you enjoyed this post, then make sure you subscribe to my RSS Feed.

  • Quick Tips , Ruby on Rails
  • Comments(1)

One Response to “How to exclude an action from the controller’s layout processing”

  1. Jesus Acuna VENEZUELAon 02 Nov 2006 at 10:13 pm

    Oh thank god, I was trying to figured out how to do this, thanks for sharing :D