Jan
11
How to exclude an action from the controller’s layout processing
By Antonio Cangiano. Filed under Quick Tips, Ruby on Rails
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
Related Articles:
- Why MacRuby Matters (Present & Future)
- How much faster is Ruby on Linux?
- New look and feel. Do you like it?
- Benchmarking Tornado vs. Twisted Web vs. Tornado on Twisted
- Setup Ruby Enterprise Edition, nginx and Passenger (aka mod_rails) on Ubuntu
If you enjoyed this post, then make sure you subscribe to our RSS Feed.
Comments
One Response to “How to exclude an action from the controller’s layout processing”























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