forked from OpenNeo/impress
fix error loading lookups when given pet name has trailing spaces
This commit is contained in:
parent
b25b6e55b3
commit
6cdf1567f8
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ class PetState < ActiveRecord::Base
|
||||||
# and its mood.
|
# and its mood.
|
||||||
begin
|
begin
|
||||||
user_pet = Neopets::User.new(username).pets.
|
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.female = user_pet.female?
|
||||||
self.mood_id = user_pet.mood.id
|
self.mood_id = user_pet.mood.id
|
||||||
self.labeled = true
|
self.labeled = true
|
||||||
|
|
Loading…
Reference in a new issue