From 6cdf1567f86255295e55cb719f4150269250be8d Mon Sep 17 00:00:00 2001 From: Matchu Date: Tue, 5 Jun 2012 13:28:59 -0400 Subject: [PATCH] fix error loading lookups when given pet name has trailing spaces --- app/models/pet_state.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/pet_state.rb b/app/models/pet_state.rb index 8044bf87..d7c4a757 100644 --- a/app/models/pet_state.rb +++ b/app/models/pet_state.rb @@ -71,7 +71,7 @@ class PetState < ActiveRecord::Base # and its mood. begin user_pet = Neopets::User.new(username).pets. - find { |user_pet| user_pet.name.downcase == pet.name.downcase } + find { |user_pet| user_pet.name.downcase == pet.name.strip.downcase } self.female = user_pet.female? self.mood_id = user_pet.mood.id self.labeled = true