# Inherited layout doesn't work

**URL:** <https://www.ruby-forum.com/t/inherited-layout-doesnt-work/110923>\
**Category:** Rails\
**Created:** [August 1, 2007, 2:47am UTC](https://www.ruby-forum.com/t/inherited-layout-doesnt-work/110923 "2007-08-01T02:47:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ssk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/82dd89/32.png) [@ssk](https://www.ruby-forum.com/u/ssk)\
**Post date:** [August 1, 2007, 2:47am UTC](https://www.ruby-forum.com/t/inherited-layout-doesnt-work/110923/1 "2007-08-01T02:47:19Z")

</div>

Hi,

I have a strange problem.

class ApplicationController \< ActionController::Base  
layout ‘test’  
end

class UserController \< ApplicationController

end

UserController’s layout should be ‘test’.  
However, if app/view/layouts/user.rhtml exists, UserController uses it  
as its layout.  
If I remove user.rhtml, UserController uses ‘test’ as its layout.

So, it seems that UserController tries to use ‘user’ and only if it  
doesn’t exist, it uses the inherited layout.  
Is this a feature or bug?

Thanks in advance.  
Sam
