forked from OpenNeo/impress
Emi Matchu
3dab235335
Oh right, it's possible for `Item#pb?` to return true, but `Item#pb_color` to return `nil`, if the item has the paintbrush item description but we can't find a color whose name matches the item name. This would be expected if a new color were added to Neopets, and PB items for it were modeled by the community, but we hadn't manually added the color to the database yet. Previously, the Item Getting Guide would crash in this scenario. Now, it correctly handles the possibility of a `nil` value for `pb_color`, and shows some placeholder info. To test this, I temporarily edited some item names to not contain the color name anymore (e.g. "P-rate Elephante Shirt and Vest"), then loaded the guide and made changes until it no longer crashed. |
||
---|---|---|
.. | ||
devise | ||
fundraising | ||
about_controller.rb | ||
alt_styles_controller.rb | ||
application_controller.rb | ||
auth_users_controller.rb | ||
closet_hangers_controller.rb | ||
closet_lists_controller.rb | ||
contributions_controller.rb | ||
item_appearances_controller.rb | ||
item_trades_controller.rb | ||
items_controller.rb | ||
locales_controller.rb | ||
neopass_connections_controller.rb | ||
neopets_connections_controller.rb | ||
neopets_page_import_tasks_controller.rb | ||
outfits_controller.rb | ||
pet_types_controller.rb | ||
pets_controller.rb | ||
sitemap_controller.rb | ||
users_controller.rb |