# Layout not being inherited

**URL:** <https://www.ruby-forum.com/t/layout-not-being-inherited/112543>\
**Category:** Rails\
**Created:** [August 20, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/layout-not-being-inherited/112543 "2007-08-20T19:57:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/839c29/32.png) [@pedz](https://www.ruby-forum.com/u/pedz)\
**Post date:** [August 20, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/layout-not-being-inherited/112543/1 "2007-08-20T19:57:58Z")

</div>

I’m trying to figure out why layout is not inherited.

I have:

app/controllers/parent\_controller.rb  
class ParentController \< ApplicationController  
layout “parent”  
end

app/controllers/samples\_controller.rb  
class SamplesController \< ParentController

```
  <typical REST controller generated by script/generate scaffold>

```

end

When I go to:  
[http://localhost:3000/samples](http://localhost:3000/samples)

my server reports:

Processing SamplesController#index (for 127.0.0.1 at 2007-08-19  
16:11:33) [GET]  
Session ID:  
BAh7BiIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNo  
%0ASGFzaHsABjoKQHVzZWR7AA%3D%3D–  
cdf58d4f1f219a35fb0792623148183f1dab5872  
Parameters: {“action”=\>“index”, “controller”=\>“samples”}  
SQL (0.000499) SHOW client\_min\_messages  
SQL (0.000151) SET client\_min\_messages TO ‘panic’  
SQL (0.000090) SHOW standard\_conforming\_strings  
SQL (0.000079) SET client\_min\_messages TO ‘notice’  
Sample Load (0.001488) SELECT \* FROM samples  
Rendering template within layouts/samples  
Rendering samples/index  
Completed in 0.00824 (121 reqs/sec) | Rendering: 0.00272 (33%) | DB:  
0.00231 (27%) | 200 OK [[http://localhost/samples](http://localhost/samples)]

I have app/views/layouts/parent.html.erb and  
app/helpers/parent\_helper.rb

The first is a copy of samples.html.erb with a line added that says  
“In  
Parent” and the later is just an empty module for ParentHelper.

I don’t see the “In Parent” text either.

This looks like a bug to me but I thought I would check here first.

Thank you,  
Perry
