1
0
Fork 0
forked from OpenNeo/impress
impress/app/models
Emi Matchu 1e99376449 Remove hundreds of unnecessary queries from /alt-styles page!
I think the Rails query cache handled these anyway? But `SwfAsset` has
a `before_save` hook that checks its zone's info, and
`SwfAsset.preload_manifests` saves all the assets, on the assumption
that saving is a no-op when the record didn't change anyway. And it
basically is!

But I figure that, now that I'm realizing hooks exist, simply not
attempting to save unchanged records is probably a better
representation of what we intend to do. So I'm fixing it like that!

Another potential fix would be to preload the zones for these assets,
but I think that confuses the intent too much; the method itself isn't
using the zones, it's just a weird incidental thing that a save hook
happens to use. (Would probably be better to refactor this old save
hook into a different situation altogether, but that's for another
time!)
2024-05-29 18:52:36 -07:00
..
fundraising Move fundraising models into the Fundraising module 2024-02-18 20:29:31 -08:00
item Use fits:nostalgic-faerie-draik filter format when we can 2024-02-27 15:51:27 -08:00
alt_style.rb Assume new alt styles are "Nostalgic" until the end of 2024 2024-05-29 18:46:17 -07:00
application_record.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
auth_record.rb Add AuthUser model, connecting to openneo_id db 2023-10-23 19:05:07 -07:00
auth_user.rb Use Neopets username as base name for new NeoPass accounts, if possible 2024-04-09 07:48:13 -07:00
closet_hanger.rb Fix MissingAttributeError in ClosetHanger#merge_quantities 2024-02-28 13:30:55 -08:00
closet_list.rb Disallow email addresses in closet list descriptions 2024-04-16 17:04:31 -07:00
closet_visibility.rb Delete a couple unused accessors 2023-11-11 15:42:08 -08:00
color.rb Use a pet face when there's no paint brush, in Item Getting Guide 2024-05-22 17:53:52 -07:00
contribution.rb Track contributions of Alt Styles 2024-01-24 03:54:43 -08:00
item.rb Improve performance of Owls values in Item Getting Guide 2024-05-27 16:21:22 -07:00
item_outfit_relationship.rb Oops, update outfit's updated_at when adding/removing items 2024-02-08 10:32:53 -08:00
nc_mall_record.rb Add more info to NC Mall section of Item Getting Guide 2024-05-14 16:04:40 -07:00
neopets_connection.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
neopets_page.rb Update most URLs to use HTTPS 2023-10-25 15:22:57 -07:00
outfit.rb Refactor Impress 2020 config 2024-02-22 13:07:43 -08:00
parent_swf_asset_relationship.rb Upgrade to Rails 5.2.8.1 2023-10-23 19:05:05 -07:00
pet.rb To "fetch" the image hash of an image hash name, just take off the @! 2024-04-16 15:57:39 -07:00
pet_state.rb Remove logic to auto-detect Unconverted pets (fixes Baby Pteri bug) 2024-02-01 01:40:50 -08:00
pet_type.rb Refactor pet image hash loading into the Pet model, not PetType 2024-04-06 02:25:22 -07:00
species.rb Fully disable model translations for Color/Species/Zone 2024-02-03 08:13:14 -08:00
swf_asset.rb Remove hundreds of unnecessary queries from /alt-styles page! 2024-05-29 18:52:36 -07:00
user.rb Add shadowban mechanism for closet lists 2024-04-20 20:57:15 -07:00
zone.rb Add useItemSearch for wardrobe app, but don't use it yet! 2024-02-25 12:06:32 -08:00