From 3b59823fc4e2bfc97115e76f132baaf72c20210e Mon Sep 17 00:00:00 2001 From: Matchu Date: Sat, 11 Nov 2023 07:04:57 -0800 Subject: [PATCH] Fix minor item search error message bug Oops, I got the variable name wrong here! Before this change, `species:foo` would crash. Now, it shows the error message correctly. --- app/models/item/search/query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/item/search/query.rb b/app/models/item/search/query.rb index e3c0f905..bf0045dd 100644 --- a/app/models/item/search/query.rb +++ b/app/models/item/search/query.rb @@ -65,7 +65,7 @@ class Item pet_type = PetType.where(color_id: color.id, species_id: species.id).first! rescue ActiveRecord::RecordNotFound message = I18n.translate('items.search.errors.not_found.species', - species_name: species_name.capitalize) + species_name: value.capitalize) raise Item::Search::Error, message end filters << (is_positive ?