Jean-Daniel Beaubien
2006-Jul-10 16:39 UTC
[Rails] 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
Jean-Daniel Beaubien
2006-Jul-10 22:13 UTC
[Rails] Are user-made modules supposed to work?
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. Jean-Daniel Beaubien wrote:> 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 > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >
> > 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.
Jean-Daniel Beaubien
2006-Jul-11 00:53 UTC
[Rails] Are user-made modules supposed to work?
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 Jim Lindley wrote:>> >> 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. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >