summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2013-09-10 08:56:24 +0200
committerGibheer <gibheer@gmail.com>2013-09-10 08:56:24 +0200
commit3e0a3f20a79330f1f152a5f3667b29cb904d959c (patch)
tree9190f9a14a2a823c05025eb1bbc1aec47a2fdfbe /lib
parentdefb7703c69d1e4f756254723d50997fb8dc63da (diff)
allow a dash in the middle url part
Diffstat (limited to 'lib')
-rw-r--r--lib/zero/router.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/zero/router.rb b/lib/zero/router.rb
index 482f25a..7f16933 100644
--- a/lib/zero/router.rb
+++ b/lib/zero/router.rb
@@ -20,7 +20,7 @@ module Zero
# match for variables in routes
VARIABLE_MATCH = %r{:(\w+)[^/]?}
# the replacement string to make it an regex
- VARIABLE_REGEX = '(?<\1>[\w]+?)'
+ VARIABLE_REGEX = '(?<\1>[\w-]+?)'
# regex part of the beginning of the line
REGEX_BEGINNING = '\A'
# regex part of the end of the line