Mitchell.Gillespie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Nov-24 21:17 UTC
packaging controllers in Rails
Hey all, I am just starting to learn rails, and I was curious to know if it is possible to set up folder systems within the apps/controller area? Our application is beginning to become quite large, and we would really like to package/organize controllers together in separate folders for maintainability... Thanks, Mitch Gillespie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Mitchell.Gillespie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Nov-24 21:32 UTC
Re: packaging controllers in Rails
Sorry.. just to provide an example this is what we''re looking to accomplish.. app/controllers/questions app/controllers/sections app/controllers/answers app/controllers/questions/question1_controller.rb app/controllers/questions/question2_controller.rb ... and so on.. We''re positive the change will be in the routes.rb file.. but were just not 100% sure how to accomplish it. Thanks, On Nov 24, 4:17 pm, "Mitchell.Gilles...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <Mitchell.Gilles...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey all, > > I am just starting to learn rails, and I was curious to know if it > is possible to set up folder systems within the apps/controller area? > Our application is beginning to become quite large, and we would > really like to package/organize controllers together in separate > folders for maintainability... > > Thanks, > > Mitch Gillespie--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 24 Nov 2007, at 21:32, Mitchell.Gillespie-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> > Sorry.. just to provide an example this is what we''re looking to > accomplish.. > > app/controllers/questions > app/controllers/sections > app/controllers/answers > app/controllers/questions/question1_controller.rb > app/controllers/questions/question2_controller.rb > ... and so on.. >You can do stuff like app/controllers/foo app/controllers/foo/question_controller.rb app/controllers/bar app/controllers/foo/answer_controller.rb And in answer_controller.rb you define Foo::AnswerController You''ll get this automatically if you run ruby script/generate foo/ answer Fred> We''re positive the change will be in the routes.rb file.. but were > just not 100% sure how to accomplish it. > > Thanks, > > > > On Nov 24, 4:17 pm, "Mitchell.Gilles...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" > <Mitchell.Gilles...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hey all, >> >> I am just starting to learn rails, and I was curious to know if it >> is possible to set up folder systems within the apps/controller area? >> Our application is beginning to become quite large, and we would >> really like to package/organize controllers together in separate >> folders for maintainability... >> >> Thanks, >> >> Mitch Gillespie > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---