Hey Freddy, So I'm not sure if my routes file is setup correctly after your last comment. Would you mind taking a look at it?
ActionController::Routing::Routes.draw do |map| map.resources :customers, :has_Many => :accounts map.resources :customers, :member => {:info_for_account_form => :post} map.resources :owners, :has_many => :accounts map.resources :owners, :member => {:info_for_account_form => :post} map.resources :usertypes, :has_many => :accounts map.resources :accounts, :belongs_to => :owner map.resources :accounts, :belongs_to => :customer map.resources :accounts, :collection => {:auto_complete_belongs_to_for_account_customer_name => :post} map.resources :accounts, :collection => {:auto_complete_belongs_to_for_account_owner_name => :post} # Install the default routes as the lowest priority. map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end On Apr 6, 2:29 pm, Freddy Andersen <fre...@cfandersen.com> wrote: > Yes all you need is the second statement. If you have both try running > the command rake routes from the rails root directory it will show you > what the two would do.(Or the one if you remove the top one.) THe > second line could also be written like > > map.resources :customers do |customer| > customer.resources :accounts > end > > You would need that if you wanted to add a member or collections route > to accounts > > On Apr 6, 1:10 pm, internetchris <ch...@silhouettesolutions.net> > wrote: > > > > > Hey Everyone, > > > I'm wondering if the statement below are redundant? Once you define > > the resources for a particular controller, that should be it right? > > I'm assuming all I need is the second statement below. > > > map.resources :customers > > map.resources :customers, :has_many => :accounts > > > Thanks! > > > Chris --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---