From 5c92b666c31102d576cc37623ff27343349a3ac5 Mon Sep 17 00:00:00 2001 From: Jonathan Rosenbaum Date: Sun, 15 Mar 2026 23:16:12 +0000 Subject: [PATCH] Using a case insensitive constraint in routes broke slugs with periods, see d288f192fa , returned this code because it's being handled by similar code in the controllers. Issue resolved, and is working perfectly. --- config/routes.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index a399c37..5669e3e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -16,8 +16,8 @@ BikeBike::Application.routes.draw do get 'new' => 'administration#new', as: :new_conference post 'save' => 'administration#save', as: :save_conference - # Public routes with slug normalization - scope ':slug', constraints: SlugConstraint.new do + # Slug with regex allowing dots, unicode, etc. (original working behavior) + scope ':slug', constraints: { slug: /[^\/]+/ } do root 'conferences#view', as: :conference # Registration @@ -66,8 +66,8 @@ BikeBike::Application.routes.draw do end end - # Admin routes (without slug normalization) - scope ':slug' do + # Admin routes (same regex constraint as public routes) + scope ':slug', constraints: { slug: /[^\/]+/ } do get 'edit' => 'administration#edit', as: :edit_conference # Administration