On Fri, Jul 25, 2008 at 14:57, Sandeep Gudibanda
<[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to list companies in a catalog. I have set following route
> for that
>
> map.connect 'company/:company'
>            :controller => 'community',
>      :action => 'search'
>
> Now I have ".com" as a part of the company name(Amazon.com), then my app
> flags out an error stating:
> no route found to match "/company-profile/amazon.com" with
> {:method=>:get})
>
> How can i avoid this?
>

Just specify a catchall condition on the parameter :

map.connect 'company/:company', :controller => 'community', :action =>
'search', :company => /.*/

PS: this mailing list is almost french oriented ;)

-- 
http://fabien.jakimowicz.com

--~--~---------~--~----~------------~-------~--~----~
Vous avez reçu ce message, car vous êtes abonné au groupe "Railsfrance" de 
Google Groups.
Pour transmettre des messages à ce groupe, envoyez un e-mail à l'adresse 
[email protected]
Pour résilier votre abonnement envoyez un e-mail à l'adresse [EMAIL PROTECTED]
-~----------~----~----~----~------~----~------~--~---

Répondre à