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
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
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.