laredotornado-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org
2008-Jan-09 15:08 UTC
What is the optimal number of controllers for this?
Hi, I''m still adjusting to Ruby on Rails and the MVC model. But I wanted to query the group on what the best design is -- i.e. how many controllers should I have for the following. A customer will register on our site to order a product. After registration, or if they leave and decide to log in again, they can place their orders through a pre- built order form. After placing the order, they see a thank you screen and receive a confirmation email. What is the best number of controllers (and which ones) should I create for this? Thanks, - Dave --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I would think you''ll need 3. Customers Products Orders Each customer has_many orders, and each order has_many products. But you also might need something for payments also, depending on how you process them. -Ryan On Jan 9, 9:08 am, "laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org" <laredotorn...-8iDLEspWrrZBDgjK7y7TUQ@public.gmane.org> wrote:> Hi, > > I''m still adjusting to Ruby on Rails and the MVC model. But I wanted > to query the group on what the best design is -- i.e. how many > controllers should I have for the following. A customer will register > on our site to order a product. After registration, or if they leave > and decide to log in again, they can place their orders through a pre- > built order form. After placing the order, they see a thank you > screen and receive a confirmation email. > > What is the best number of controllers (and which ones) should I > create for this? > > Thanks, - Dave--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---