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. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
javascript | ||
mailers/fundraising | ||
models | ||
services | ||
views |