Allow regex route placeholders to work like -alpha and -numeric

Description

Let's make these all consistent:

This already exists-- no change

Adds rc.userID

This already exists-- no change

Adds rc.slug

New functionality to match above precedent

Adds rc.extension

This already exists-- no change

Adds nothing to rc

For the record, I'm also curious what the purpose of the colon ":" is after the word "regex". It's a little confusing since it comes after there, yet the colon comes before the other place holders. The colon really seems to serve no purpose in my suggested new functionality, but I left it there just so it would match the existing regex placeholder.

Also note, I think this new functionality would potentially do the same thing as the constraints argument to addRoute(), but does it inline the same way as -numeric and -alpha.

Activity

Show:
Luis Majano
March 6, 2014, 5:15 PM

I like this Brad.

I think that this has evolved throughout the years as well and inconsistencies have shined through. The regex: was done so I could parse it more easily.

The constraints was done so I could have a nice way to define more than 1. However, adding a -regex: is a great idea. So I will accept this so we can tackle it once we start dev.

Luis Majano
March 6, 2014, 5:16 PM

I have assigned it and added an estimate, go for it.

Brad Wood
March 18, 2014, 9:37 PM
Fixed

Assignee

Brad Wood

Reporter

Brad Wood

Labels

None

Time tracking

0m

Time remaining

45m

Components

Fix versions

Priority

Major
Configure