From 99e8b461576406a3f4227c4820c0c8d587056b7d Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Thu, 26 Sep 2024 18:36:49 -0700 Subject: [PATCH] Oops, fix bug parsing "8-Bit-Chia" in Rainbow Pool URLs --- app/controllers/pet_types_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/pet_types_controller.rb b/app/controllers/pet_types_controller.rb index a8b4bdf3..bee670dd 100644 --- a/app/controllers/pet_types_controller.rb +++ b/app/controllers/pet_types_controller.rb @@ -20,7 +20,7 @@ class PetTypesController < ApplicationController color_id: params[:color_id], ) elsif params[:name] - color_name, species_name = params[:name].split("-", 2) + color_name, _, species_name = params[:name].rpartition("-") raise ActiveRecord::RecordNotFound if species_name.blank? PetType.matching_name(color_name, species_name).first! else