# Engines And Controller Modules

**URL:** <https://www.ruby-forum.com/t/engines-and-controller-modules/104022>\
**Category:** Engines\
**Created:** [May 13, 2007, 1:28am UTC](https://www.ruby-forum.com/t/engines-and-controller-modules/104022 "2007-05-13T01:28:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Jensen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Eric\_Jensen](https://www.ruby-forum.com/u/Eric_Jensen)\
**Post date:** [May 13, 2007, 1:28am UTC](https://www.ruby-forum.com/t/engines-and-controller-modules/104022/1 "2007-05-13T01:28:35Z")

</div>

I’ve been using engines over the weekend and have been very pleased  
with my smaller test apps. But I’m now trying a more complex app and  
running into some issues. This app uses the controller modules, I.E.

class Admin::UsersController \< ApplicationController

So the views are in app/views/admin/users.

With engines the site functions properly until it needs to go into an  
Admin controller. Then it says it can’t find the view. So it seems  
to me it no longer looks in the engine for the view, but tries to find  
it locally. Anybody know of a fix for this?

Eric

---

<div class="post-metadata">

**Author:** ![Eric\_Jensen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/3be4f8/32.png) [@Eric\_Jensen](https://www.ruby-forum.com/u/Eric_Jensen)\
**Post date:** [May 27, 2007, 6:09am UTC](https://www.ruby-forum.com/t/engines-and-controller-modules/104022/2 "2007-05-27T06:09:56Z")

</div>

I’ve never seen modules in controllers before and couldn’t find much on  
the web about it. I was hoping to try to replicate this… Can you tell  
me what file you’d call this? and what directory it would go in?

-Andrew

Eric Jensen wrote:

> I’ve been using engines over the weekend and have been very pleased  
> with my smaller test apps. But I’m now trying a more complex app and  
> running into some issues. This app uses the controller modules, I.E.
> 
> class Admin::UsersController \< ApplicationController
> 
> So the views are in app/views/admin/users.
> 
> With engines the site functions properly until it needs to go into an  
> Admin controller. Then it says it can’t find the view. So it seems  
> to me it no longer looks in the engine for the view, but tries to find  
> it locally. Anybody know of a fix for this?
> 
> Eric
