wbr wrote:
> While I appreciate the feedback, it's not the direction I'm looking
> for. This rails app is huge, with views and controllers designed
> around a specific and complex structure. Adding controllers or
> restructuring the controller/view architecture every time someone
> wants to create a pretty route for a specific search, is not really
> the Rails way is it? 

No.  But you've at least got to make sure the controller expects 
parameters with reasonable names.

> To me, that would be sloppy programming.

And to me too. But that's not the issue here.

> 
> 
> To clarify my original question:
> 
> I want to create a route that parses path segments to parameters with
> complex keys:
> 
>     map.programs 'programs/:program[program_type]/:program
> [:leader_id]', :controller=>..., :action=>...
> 
> I'm looking for a way to tweak the route definition or to remap rout-
> definition-compatible parameters, so that by the time they reach the
> controller they have the correct key names.

Just introduce a routine in the controller that transforms the parameter 
names in some generic way.  Problem solved.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to