Hmm yes with a but.
You potentially have an endless number of controller .pm
much beter to throw all you cities in one controler with each city a sub
route->("cities/:action/show")->->to("cities#show");
now instead of having to add a new controler for each city you only need a new
sub of the city name?
the 'show' in the ruout is not really needed IMHO
route->("cities/:action")->->to("cities#show");
Date: Fri, 24 Jan 2014 11:40:56 -0800
From: [email protected]
To: [email protected]
Subject: [Mojolicious] Re: Help on RESTful routes
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.
--
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.