Hi, I tried searching Google but didn''t find anything relevant. When I try to ''show'' I get the following error: no route found to match "/pay_files/show/9.0" with {:method=>:get} However the url "/pay_files/show/9" works fine. The ''.0'' is causing the issue. Thanks for any help. Sri --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> When I try to ''show'' I get the following error: > no route found to match "/pay_files/show/9.0" with {:method=>:get} > > However the url "/pay_files/show/9" works fine. The ''.0'' is causing > the issue.The dot "." is a delimiter in routes like slash "/". You probably don''t have a route like :controller/:action/:id.:sth However, you can add ":id => /.*/" to the route: map.connect '':controller/:action/:id'', :id => /.*/ This way the id can be of any kind, the route will alway match. But remember to handle params[:id] properly. regards, _jan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jan, You are right I had one route without the :id => /.*/ map.connect '':controller/:action/:id'', :id => /.*/ but not map.connect '':controller/:action/:id'', :id => /.*/ It did the trick. Thank you, Sri --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---