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

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -