# Layouts and Views

**URL:** <https://www.ruby-forum.com/t/layouts-and-views/129956>\
**Category:** Rails\
**Created:** [February 23, 2008, 12:41am UTC](https://www.ruby-forum.com/t/layouts-and-views/129956 "2008-02-23T00:41:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [February 23, 2008, 12:41am UTC](https://www.ruby-forum.com/t/layouts-and-views/129956/1 "2008-02-23T00:41:25Z")

</div>

Hello,  
I have a controller which has two actions. For the first, I want to use  
the standard layout, but for the second, I don’t want any layout. For  
example:

class MyController \< ApplicationController  
layout ‘standard’

def index  
@display = ‘this view has a standard layout!’  
end

def anotheraction  
@display = ‘this view has a standard layout, but I dont want it  
to!’  
end  
end

Is there a way I can make ‘anotheraction’ not use the layout defined in  
the class?

Any help is appreciated!

Thank you,

- Jeff M.

---

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [February 23, 2008, 12:49am UTC](https://www.ruby-forum.com/t/layouts-and-views/129956/2 "2008-02-23T00:49:36Z")

</div>

nevermind, I just got it.

layout ‘standard’, :except =\> :anotheraction

Sorry for the post - I should have googled it more thoroughly first

---

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [February 23, 2008, 1:10am UTC](https://www.ruby-forum.com/t/layouts-and-views/129956/3 "2008-02-23T01:10:38Z")

</div>

You can also render :layout =\> false in the action you don’t want to  
have a  
layout. Make sure this is the last line in the method definition.

On Sat, Feb 23, 2008 at 10:19 AM, Jeff M. \<  
removed\_email\_address@domain.invalid\> wrote:

> 

–  
Ryan B.

> **[frozenplague.net](http://www.frozenplague.net)**
>
> This domain may be for sale!

Feel free to add me to MSN and/or GTalk as this email.
