From 64789b507efe482586b2362bc07fa5d59cb26ef9 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 13 Mar 2016 00:56:44 -0500 Subject: simplify regexes --- src/guff/handlers/test-blog.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/guff/handlers/test-blog.cr b/src/guff/handlers/test-blog.cr index f22ba76..dec763c 100644 --- a/src/guff/handlers/test-blog.cr +++ b/src/guff/handlers/test-blog.cr @@ -4,11 +4,11 @@ require "../views/html/test/blog" class Guff::Handlers::TestBlogHandler < Guff::Handler def call(context : HTTP::Server::Context) case (context.request.path || "") as String - when /^\/test\/blog\/?$/ + when %r{^/test/blog/?$} draw_page(context) - when /^\/test\/blog\/set_state$/ + when %r{^/test/blog/set_state$} set_state(context) - when /^\/test\/blog\/add_post$/ + when %r{^/test/blog/add_post$} add_post(context) else call_next(context) -- cgit v1.2.3