George Adamson escribió:
> Hi there, do you know how to write router syntax to catch requests for
> images that end with say, a url param called "thumbnail"?
>
> For example, a request for "/images/path/to/any/image.jpg?thumbnail"
> would be handled by a "thumbnails/show" controller/action. (The
> controller also needs to receive the path of the requested image)
>
> Something like this pseudo code:
> match('*.jpg?thumbnail').to(:controller => 'thumbnails', :action =>
> 'show', :imagePath => ??? )
>
> Many thanks,
> George
> >
>
Well, the problem lies in the question mark, which is automatically
parsed as query string separator. You might want to go for /thumbnail,
in which case it gets a lot easier for you.
As a side note, I saw myself that the router has trouble with colons and
semicolons too. Might save you some work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"merb" 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/merb?hl=en
-~----------~----~----~----~------~----~------~--~---