Are user-made modules supposed to work?

Is there a reason why modularizing your controllers doesn’t work? I
tried the following:

ruby script/generate scaffold Admin::Bug

But it just won’t work. I get a routing error when trying to access
/admin/bugs/ :

Recognition failed for “/admin/bugs/”

P.S. If I create the model/controller individually it still doesn’t seem
to work.

A bit of help would be greatly appreciated.


Jd

Damn, in the past week I wrote 2 emails to the list on this subject and
no one ever answered back.

Is anybody using this feature? Is it supposed to be known to be
broken? I’ve googled for hours and read a bunch of stuff and nothing
ever helps me figuring out what’s going on.

ruby script/generate scaffold Admin::Bug

Recognition failed for “/admin/bugs/”

Try:

ruby script/generate scaffold bug “admin/bugs”

You need to follow the form:

ruby script/generate model “module/controller”
(or an equivalent)

With the model name being singular and the controller name usually
plural. You weren’t including a model in the scaffold generation
request, and you were looking for a plural-named controller when you
were generating a singular-named controller.

Thanks for your help… It now works, but it seemed to actually be a
RadRails problem. When I start Webrick through RadRail’s interface, the
localhost:port/admin/bugs doesn’t work, but if I manually do ruby
script/server and open a firefox, itworks fine.

Guess I’ll have to send a little email to the RadRails team…

Thank you for your time


Jd

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