Files
growstuff/spec/models
2f43175324 Fallback to crop specific photos in PhotoCapable thumbnail_url (#4739)
* Implement crop photo fallback in PhotoCapable thumbnail_url

Currently, plantings, seeds, and harvests display "no photo available" placeholders when they do not have specific photos attached. This change enables the PhotoCapable#thumbnail_url method to automatically fall back to the associated crop's thumbnail_url when no item-specific photo is present.

Additionally, this commit:
- Fixes validation in PhotoAssociation to handle crop photos that do not have a polymorphic photographable owner.
- Disables cache store during testing to prevent stale/cached default photos from leaking across specs.
- Adds comprehensive unit tests for the fallback logic.

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

* Keep only core crop photo fallback and unit tests, removing excess changes

Co-authored-by: CloCkWeRX <365751+CloCkWeRX@users.noreply.github.com>

---------

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
2026-08-10 20:09:18 +09:30
..
2026-04-26 12:55:58 +00:00