Oops, fix bug parsing "8-Bit-Chia" in Rainbow Pool URLs
This commit is contained in:
parent
734b7fba1d
commit
99e8b46157
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ class PetTypesController < ApplicationController
|
||||||
color_id: params[:color_id],
|
color_id: params[:color_id],
|
||||||
)
|
)
|
||||||
elsif params[:name]
|
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?
|
raise ActiveRecord::RecordNotFound if species_name.blank?
|
||||||
PetType.matching_name(color_name, species_name).first!
|
PetType.matching_name(color_name, species_name).first!
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue