Console question

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

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

User::MyController.mymethod

… and namespace the whole thing in routes.rb

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs