# Console question

**URL:** <https://www.ruby-forum.com/t/console-question/183843>\
**Category:** Rails\
**Created:** [February 21, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/console-question/183843 "2010-02-21T19:03:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [February 21, 2010, 7:03pm UTC](https://www.ruby-forum.com/t/console-question/183843/1 "2010-02-21T19:03:21Z")

</div>

Hi there,

how do I execute a method in the Rails console if the controller  
containing the method is not located directly in the folder “app” but in  
the folder “app/user”?

> > MyController.mymethod

…would only work if the controller were located in the “app” folder.

Thanks for any hint!  
Tom

---

<div class="post-metadata">

**Author:** ![tharrisx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e19adc/32.png) [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Post date:** [February 21, 2010, 7:38pm UTC](https://www.ruby-forum.com/t/console-question/183843/2 "2010-02-21T19:38:43Z")

</div>

Ok, found the “bug”, had to call it like this:

User::MyController.mymethod

… and namespace the whole thing in routes.rb
