fix some tests
Julien Girard
committed May 23, 2018
commit 3b81b6d8d2efb6c9ebc3620e119c73685d76587d
Showing 2
changed files with
3 additions
and 2 deletions
locomotive/steam/middlewares.rb b/lib/locomotive/steam/middlewares.rb
+1
-1
| @@ | @@ -1,6 +1,6 @@ |
| require_relative 'middlewares/thread_safe' | |
| - | require_relative 'middlewares/concerns/helpers' |
| + | require_relative_all 'middlewares/concerns' |
| require_relative_all 'middlewares' | |
| module Locomotive::Steam | |
locomotive/steam/middlewares/section.rb b/lib/locomotive/steam/middlewares/section.rb
+2
-1
| @@ | @@ -15,7 +15,8 @@ module Locomotive::Steam |
| private | |
| def get_section_id(path_info) | |
| - | path_info.match(/^\/_sections\/(?<section_id>[a-z0-9]+$)/)['section_id'] |
| + | matchs = path_info.match(/^\/_sections\/(?<section_id>[a-z0-9]+$)/) |
| + | matchs['section_id'] if matchs |
| end | |
| def section_finder | |