Catching a list of variables with a Controller
Manfred Stienstra
manfred at gmail.com
Wed Nov 15 03:07:01 EST 2006
On Nov 14, 2006, at 9:42 PM, Boris Terzic wrote:
> However, I can't get this to work since I require a variable number
> of regexp groups (like say an array) and I could not find a routing
> syntax that would allow this (something like class Filter < R '/
> filter/(\w/)*' ).
Correct.
> And I represent the N tags as a string where tags are comma-
> separated. It works but purty, it isn't.
>
> Suggestions? Or am I bonkers?
Well, you're obviously bonkers. Who in their right mind would ever
start programming Ruby?
AFAIK there is no way to represent an arbitrary number of arguments
in a URL in camping, but if you stop to think what a URL is then it's
not so strange. The most obvious place to put parts of a URL that
don't point to a resource is the query string.
< R '/expenses'
/expenses?filter=tag1+tag2+tag3
Manfred
More information about the Camping-list
mailing list