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

c# - ItextSharp font color issue in ver 5.5.4+ -

jquery - Multiple issues with pushstate: history, loading, calling functions -

php - Get process resource by PID -