Why??? Do you will to do controller for each city?? O_o

Why not it's?

/controller/:action/*cities
/controller/:action/*cities/*street/
/controller/:action/*cities/*street/*house

/city/show/Paris  - City.pm, action show, param{city} = Paris 
/city/show/ - City.pm, action show, param{} if empty-show all
/city/show/Paris/Rue Abel/2 -  City.pm, action show, param{city}=Paris, 
param{street}=Rue Abel, param{house}=2
/city/add/Antanannarivu - City.pm, action add, param{city}=Antanannarivu 
/city/delete/East Berlin  - City.pm action delete, param{city}=East Berlin


пятница, 24 января 2014 г., 21:40:56 UTC+2 пользователь LesPaul7String 
написал:
>
>
> To answer my own question
>
> for an route like this:
> /cities/:id/neighborhoods/:id/:
>
> All i have to do is to have an controller as city name and then construct 
> the route like this
> /cities/:controller/:action
>
> then, when accessing 
> /cities/paris/show 
> it will pass through Paris.pm controller, action=>show
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to