I’m trying to my a url that has optional (and not optional values)
A and C are optional
where the following are valid
And the following is invalid
I know the last value can be optional by including ,:c=>nil
But the only way I can think of for middle values to be optional is to
have all permutations written out.
map.connect ':store/:cats/:a/:b/:c, :c=> nil
map.connect ':store/:cats//:b/:c, :a=> nil, :c=> nil
For a couple of variables this is fine, but moving to 3 or more, and it
gets nuts fast.
Is there an easier way to handle this?