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 -

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

how does one get csharp-sqlite to throw exceptions for duplicates or foreign key constraint violations -