MushroomObserver / mushroom-observer

A website for sharing observations of mushrooms.
https://mushroomobserver.org
MIT License
77 stars 25 forks source link

Create `UserStats` on create Account, fix show nonexistent user #2086

Closed nimmolo closed 3 months ago

nimmolo commented 3 months ago

Seems like a blank UserStats record should get created on account creation: It's also necessary for the show user page, which a new user might try to access (before the cron that would otherwise create a missing UserStats object has run). This should solve the issue in #2078

Also fixes the redirect in UsersController#show, for a nonexistent user, #2080

Adds three tests.

coveralls commented 3 months ago

Coverage Status

coverage: 94.401%. remained the same when pulling 1ce8e3ae4e982d6dd9d2362a8ff45145d886c8ef on nimmo-create-userstats-on-create-user into dfa9ac66dac2e48134d911e0b50aae281c73cdb0 on main.