Rails routes with not-equal-to constraint -


i add not-equal-to constraint on routes rule. specifically, assert parameter should not equal something.

for instance, in following code:

get ':menu/:submenu', constraints: { # put here }.

i'd impose :submenu not equal abc. i've tried write submenu: /(?!abc)/ constraint, somehow affects other params. suggestions?


Comments