forked from OpenNeo/impress
In our tests, I discovered an unexpected behavior where calling `item.swf_assets << swf_asset` wasn't updating computed fields correctly. This isn't something we actually do in-app, I think the modeling system happened to trigger the callbacks in a way that still worked fine? But I think this is a good idea for reliability, since caching is such a notoriously difficult thing to get right anyway! And it makes our tests simpler and clearer. Specifically, `compatible_body_ids` references `swf_assets`, which, I'm kinda surprised, *doesn't* include the newly-added asset yet when the `ParentSwfAssetRelationship.after_save` hook runs while calling `item.swf_assets << swf_asset`. Reloading it fixes this! |
||
|---|---|---|
| .. | ||
| fundraising | ||
| item | ||
| pet | ||
| alt_style.rb | ||
| application_record.rb | ||
| auth_record.rb | ||
| auth_user.rb | ||
| closet_hanger.rb | ||
| closet_list.rb | ||
| closet_visibility.rb | ||
| color.rb | ||
| contribution.rb | ||
| item.rb | ||
| item_outfit_relationship.rb | ||
| nc_mall_record.rb | ||
| neopets_connection.rb | ||
| neopets_page.rb | ||
| outfit.rb | ||
| parent_swf_asset_relationship.rb | ||
| pet.rb | ||
| pet_state.rb | ||
| pet_type.rb | ||
| species.rb | ||
| swf_asset.rb | ||
| user.rb | ||
| zone.rb | ||