Hi all Is there anywhere a good tutorial for a "best-practise" structure (controller,...) for a large project? I did''t find one by now... thank you for your help! Greets sigma --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Structure of what? Your models, views and controllers? And by best practice, what is wrong then the standard layout given to you by rails? On Jun 25, 1:26 pm, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi all > > Is there anywhere a good tutorial for a "best-practise" structure > (controller,...) for a large project? > > I did''t find one by now... > > thank you for your help! > > Greets > > sigma--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi By structure i mean the structure of controllers. What is the standardway for large projects? All controllers in the same directory? Or is grouping them by functionality in sub directories a better solution? And another question: Is it possible to do something like: localhost:3000/projects/1/tasks/5 -> to get project with id 1 and than the task with id 5 from this project (just as an example) Greets On 25 Jun., 23:48, Jacob <jacob.bas...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Structure of what? Your models, views and controllers? > > And by best practice, what is wrong then the standard layout given to > you by rails? > > On Jun 25, 1:26 pm, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi all > > > Is there anywhere a good tutorial for a "best-practise" structure > > (controller,...) for a large project? > > > I did''t find one by now... > > > thank you for your help! > > > Greets > > > sigma--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I would recommend just jumping in with some tutorials and taking a look at what Rails offers. On Jun 25, 10:53 pm, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi > > By structure i mean the structure of controllers. > What is the standardway for large projects? All controllers in the > same directory? Or is grouping them by functionality in sub > directories a better solution? > > And another question: > Is it possible to do something like: localhost:3000/projects/1/tasks/5 > -> to get project with id 1 and than the task with id 5 from this > project (just as an example) > > Greets > > On 25 Jun., 23:48, Jacob <jacob.bas...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Structure of what? Your models, views and controllers? > > > And by best practice, what is wrong then the standard layout given to > > you by rails? > > > On Jun 25, 1:26 pm, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi all > > > > Is there anywhere a good tutorial for a "best-practise" structure > > > (controller,...) for a large project? > > > > I did''t find one by now... > > > > thank you for your help! > > > > Greets > > > > sigma--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Jun 25, 2008 at 11:53 PM, sigma <christoph.thommen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> And another question: > Is it possible to do something like: localhost:3000/projects/1/tasks/5 > -> to get project with id 1 and than the task with id 5 from this > project (just as an example) >Go read http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial, which walks you through exactly how to do this. --wpd --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thank you! I''ll try it out sigma On 26 Jun., 16:21, "Patrick Doyle" <wpds...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Wed, Jun 25, 2008 at 11:53 PM, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > And another question: > > Is it possible to do something like: localhost:3000/projects/1/tasks/5 > > -> to get project with id 1 and than the task with id 5 from this > > project (just as an example) > > Go readhttp://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-fir..., > which walks you through exactly how to do this. > > --wpd--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
To be honest, i have sort of the same question sometimes. What i tend to do is separate my controllers into sections. so for example, i have an admin section, a public section (in folders named admin and public_section since public kind of messes up autotest mappings... but thats another story) and other sections. Then have my controller files in there and in my views, i have a folder structure mirroring that. Then the fun beggins: For each one of this sections you need to map the route for it so in routes: map.namespace :section_name do |section_name| section_name.resources :model_name section_name.connect ... section_name.whatever end There are a few inconveniences with this approach which i will let you discover by yourself since i ran out of time. j On Jun 26, 3:34 pm, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thank you! > I''ll try it out > > sigma > > On 26 Jun., 16:21, "Patrick Doyle" <wpds...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On Wed, Jun 25, 2008 at 11:53 PM, sigma <christoph.thom...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > And another question: > > > Is it possible to do something like: localhost:3000/projects/1/tasks/5 > > > -> to get project with id 1 and than the task with id 5 from this > > > project (just as an example) > > > Go readhttp://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-fir..., > > which walks you through exactly how to do this. > > > --wpd--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---