Oops, fix bug parsing "8-Bit-Chia" in Rainbow Pool URLs

This commit is contained in:
Emi Matchu 2024-09-26 18:36:49 -07:00
parent 734b7fba1d
commit 99e8b46157

View file

@ -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