I have the following routes set up:
map.people 'people(.:format)', :conditions => { :method => :get }, :controller=>"people", :action=>"index"
map.connect 'people(.:format)', :conditions => { :method => :post }, :controller=>"people", :action=>"create"
map.new_person 'people/new(.:format)', :conditions => { :method => :get }, :controller=>"people", :action=>"new"
map.edit_person 'people/:shortname/edit(.:format)', :conditions => { :method => :get }, :controller => 'people', :action => 'edit'
map.person 'people/:shortname(.:format)', :conditions => { :method => :get }, :controller=>"people", :action=>"show"
map.connect 'people/:shortname(.:format)', :conditions => { :method => :put }, :controller=>"people", :action=>"update"
map.connect 'people/:shortname(.:format)', :conditions => { :method => :delete }, :controller=>"people", :action=>"destroy"
I am trying to use the link_to function on a view page like:
<%= link_to 'Show', person_path(person.shortname) %>
This gives me this error and I am not sure what I am doing wrong:
person_url failed to generate from {:controller=>"people", :shortname=>"efleming", :action=>"show"}, expected: {:controller=>"people", :action=>"show"}, diff: {:shortname=>"efleming"}