Commit graph

16 commits

Author SHA1 Message Date
111d4dcaee Fix bug with Arel ordering
Ok so weird little situation, usually Arel will accept an attribute as a param to `order()`, but not when it's in a very specific situation of all of the following:

`Item.joins(:translations).includes(:translations).limit(30).order(Item::Translation.arel_table[:name])`

For some reason, it's all like "hey I can't call `to_sql` on an attribute!", but only in the scenario where all 3 of those other things are present. Weird!

Anyway, explicitly saying `.asc` fixes this. Ok!
2023-08-02 16:29:31 -07:00
4f564db785 Upgrade to Rails 5.2.8.1
Some important little upgrades but mostly straightforward!

Note that there's still a known issue where item searches crash, I was hoping that this was a bug in Rails 4.2 that would be fixed on upgading to 5, but nope, oh well!

Also uhh I just got a bit silly and didn't actually mean to go all the way to 5.2 in one go, I had meant to start at 5.0… but tbh the 5.1 and 5.2 changes seem small, and this seems to be working, so. Yeah ok let's roll!
2023-08-02 16:05:09 -07:00
Matchu
a0de57bed9 Backfill globalize's find_by_name method
This method was removed in globalize 4, which we upgraded to for compatibility with Rails 4! Let's add back in a similar thing for now!
2023-07-28 15:33:46 -07:00
Matchu
070599e2ca Add fits and not_fits back to item search
Some fun stuff here to figure out how to API this out well, but I'm pretty pleased with where it ended up!
2023-07-28 14:45:10 -07:00
Matchu
f997513e87 Update to new scope syntax
Ohh ok, without this change all of our `scope`s were just immediately evaluating the argument and fetching _all_ such matching records immediately, instead of waiting to actually be called. This led to bugs like `pet_type.as_json` returning ALL pet states in the whole db, because the `PetState.emotion_order` scope was being treated as a single predefined query, rather than a query fragment to merge into the current context.

This also explains what happened in 724ed83: that's why things before the scope in the query were being ignored.
2023-07-22 14:04:01 -07:00
a326f09eda lolwhoops, measure prank-funniness in PST 2014-04-01 19:10:44 -05:00
6e80c228c1 include prank message on wardrobe page 2014-03-30 22:37:33 -05:00
8e93d603fa list prank colors as fake on the homepage, unless pranks are funny today 2014-03-27 22:44:18 -05:00
b583254397 create colors from rake 2014-03-27 22:28:48 -05:00
1c0b5c743e better handle new colors and species 2013-02-15 23:57:06 -06:00
eaf875c6c7 zone, species, color alphabetical by the current locale
We were joining to the translations table to sort records
alphabetically, but then it sorted by *all* of the translations in
some strange way. Now use with_translations to restrict the join
to the current locale.
2013-01-27 00:25:52 -06:00
ce4e2fd53c move species to database 2013-01-24 18:25:59 -06:00
3d29f7784f asset spider, yaaay 2010-11-27 18:41:06 -05:00
37372544b0 alter item swf asset routes to allow for page caching 2010-06-08 18:26:42 -04:00
66c43e220a move species supported images for item show into pet_type method 2010-05-16 16:15:21 -04:00
f6dce65dfb add color model, have it and species descend from PetAttribute 2010-05-16 15:44:32 -04:00