Routes file: ActionController::Routing::Routes.draw do |map| map.resources :people map.resources :users map.root :controller => "homepage" map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end'
On Jun 22, 2:51 pm, Rui Carvalho <[email protected]> wrote: > How do you have this on your routes file? > > > > On Tue, Jun 22, 2010 at 7:34 PM, richardsugg <[email protected]> wrote: > > I want to show a page that lists people that belong to a particular > > company (each person has a company_id). My link_to looks like > > > <%= link_to "people", :controller => "people", :action => > > "by_company", :company_id => @company.id %> > > > which produces the link > > >http://my-server-name/people/by_company?company_id=1 > > > However, it errors with > > > Couldn't find Person with ID=by_company > > {"id"=>"by_company", > > "company_id"=>"1"} > > > Why would the id be set to "by_company"? Shouldn't that be the > > action? > > > Thanks! > > > -- > > 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 [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<rubyonrails-talk%2Bunsubscrib > > [email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

