By Antonio Cangiano, Software Engineer & Technical Evangelist at IBM
Currently Browsing: Quick Tips

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

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

Next Entries »

Copyright © 2005-2010 Antonio Cangiano. All rights reserved.