# controller inheritance problem

**URL:** <https://discuss.rubyonrails.org/t/controller-inheritance-problem/6409>\
**Category:** rubyonrails-talk\
**Created:** [December 28, 2006, 9:42am UTC](https://discuss.rubyonrails.org/t/controller-inheritance-problem/6409 "2006-12-28T09:42:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Con](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Con](https://discuss.rubyonrails.org/u/Con)\
**Post date:** [December 28, 2006, 9:42am UTC](https://discuss.rubyonrails.org/t/controller-inheritance-problem/6409/1 "2006-12-28T09:42:51Z")

</div>

Hi Tia, Ruby doesn't support multiple inheritance but it supports what is called a mixin module or simply a mixin. Please reference "Programming Ruby" pages 118 - 120.

Good luck,

-Conrad

---

<div class="post-metadata">

**Author:** ![Chris\_T](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@Chris\_T](https://discuss.rubyonrails.org/u/Chris_T)\
**Post date:** [December 31, 2006, 4:54pm UTC](https://discuss.rubyonrails.org/t/controller-inheritance-problem/6409/2 "2006-12-31T16:54:23Z")

</div>

harper wrote:

> Conrad Taylor wrote:
> 
> > Hi Tia, Ruby doesn't support multiple inheritance but it supports what is called a mixin module or simply a mixin. Please reference "Programming Ruby" pages 118 - 120.
> > 
> > Good luck,
> > 
> > -Conrad
> 
> ok...
> 
> so i 'require' this module? it's not a module, it's a ApplicationController / PagesController class, it's not a module Something. i'm supposed to do require 'PagesController' and it will call all the methods from the pages-controller automaticly? ...doesn't seem to work just like that. . . unfortunately, i feel a little lost...

The point is, you're trying to inherit from two parents, which Ruby doesn't support. The way around this -- in Ruby -- is, as Conrad said, to use a module in which the methods you want are defined and then mix this in.
