File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
app/lib/ext/action_dispatch/routing Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ module Routing
3
3
class Mapper
4
4
# Mapper class provides methods for routes.rb
5
5
ID_FORMAT_REGEX = /\w {8}/
6
+ ID_OR_SCHEMA_FORMAT_REGEX = /\w {8}|schema\/ \w +/
6
7
7
8
# @since 0.0.1
8
9
# Creates routes for listables
Original file line number Diff line number Diff line change 7
7
8
8
Rails . application . routes . draw do
9
9
id_format_regex = self . class ::ID_FORMAT_REGEX
10
+ id_or_schema_format_regex = self . class ::ID_OR_SCHEMA_FORMAT_REGEX
10
11
11
12
### Root ###
12
13
# /
332
333
scope '/resource' , as : 'resource' do
333
334
get '/' , to : 'resource#index'
334
335
scope '/:resource_id' do
335
- get '/' , to : 'resource#show' , resource_id : id_format_regex
336
+ get '/' , to : 'resource#show' , resource_id : id_or_schema_format_regex
336
337
end
337
338
end
338
339
You can’t perform that action at this time.
0 commit comments