# Layouts in Rails 3.0

**URL:** <https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885>\
**Category:** Rails\
**Created:** [August 26, 2010, 5:22am UTC](https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885 "2010-08-26T05:22:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 26, 2010, 5:22am UTC](https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885/1 "2010-08-26T05:22:05Z")

</div>

I have an admin section in my rails 3 app. where I want to use a  
different layout than the main layouts/application.html.haml layout.  
Here is the snippet of the admin\_controller.rb:

class AdminController \< ApplicationController

current\_section :admin  
layout :admin  
.  
.  
end

Here are the contents of the layouts/admin.html.haml file:

- content\_for :secondary\_nav do

= render :file =\> “layouts/application”

Rails 3 is ignoring the admin layout all-together. Rails 2.3.8 doesn’t.  
Is there an existing bug in Rails 3?

Bharat

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 26, 2010, 9:36am UTC](https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885/2 "2010-08-26T09:36:23Z")

</div>

I think it should be layout “admin” . For some reason symbols in the  
layout doesn’t work.

---

<div class="post-metadata">

**Author:** ![bruparel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e47774/32.png) [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Post date:** [August 26, 2010, 10:37pm UTC](https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885/3 "2010-08-26T22:37:57Z")

</div>

Hello Johndel,  
Thanks for your response. Unfortunately, it did not work. I typed in

layout “admin”

instead of

layout :admin

Still. No luck.  
Bharat
