Skip to content

Commit 0355b21

Browse files
committed
Fix regexp
1 parent cb3171a commit 0355b21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def configure_permitted_parameters
106106
end
107107

108108
def set_layout_and_contest
109-
if /^\/contests\/./.match(request.fullpath) && !/^\/contests\/new\/?/.match(request.fullpath)
109+
if /^\/contests\/./.match(request.fullpath) && !/^\/contests\/new(\/|$)/.match(request.fullpath)
110110
# Use arbitrary character here instead of [0-9] to give proper 404 to requests such as /contests/abcde
111111
# However, we need to exclude /contests/new
112112
@layout = :contest

0 commit comments

Comments
 (0)