Skip to content

Conversation

@CloCkWeRX
Copy link
Collaborator

@CloCkWeRX CloCkWeRX commented May 25, 2025

Fix #1504

This commit introduces an 'overall_rating' attribute to the Planting model, allowing you to rate your plantings on a scale of 1 to 5.
image

Key changes include:

  • Added overall_rating integer column to the plantings table with a database migration.
  • Implemented validation in the Planting model for overall_rating (integer, 1-5, allows blank).
  • Updated Planting form (new/edit) to include a select field for overall_rating.
  • Updated Planting show page to display the overall_rating if present.
  • Added schema.org Rating metadata (JSON-LD) to the Planting show page when a rating exists.
  • Updated the Harvest show page to display an alert prompting you to rate the associated planting if it hasn't been rated yet.
  • Added model and feature tests to cover the new functionality, including validations, UI changes, JSON-LD output, and the harvest rating prompt.

Note: I encountered an environment-specific database connection issue during development which hindered database migrations and test execution.

google-labs-jules bot and others added 2 commits May 25, 2025 00:22
This commit introduces an 'overall_rating' attribute to the Planting model,
allowing you to rate your plantings on a scale of 1 to 5.

Key changes include:
- Added `overall_rating` integer column to the `plantings` table with a
  database migration.
- Implemented validation in the `Planting` model for `overall_rating`
  (integer, 1-5, allows blank).
- Updated Planting form (new/edit) to include a select field for
  `overall_rating`.
- Updated Planting show page to display the `overall_rating` if present.
- Added schema.org `Rating` metadata (JSON-LD) to the Planting show page
  when a rating exists.
- Updated the Harvest show page to display an alert prompting you to rate
  the associated planting if it hasn't been rated yet.
- Added model and feature tests to cover the new functionality, including
  validations, UI changes, JSON-LD output, and the harvest rating prompt.

Note: I encountered an environment-specific database connection issue during development which hindered database migrations and test execution.
@CloCkWeRX CloCkWeRX marked this pull request as ready for review September 1, 2025 12:52
@CloCkWeRX CloCkWeRX merged commit c189e3b into dev Sep 1, 2025
16 checks passed
@CloCkWeRX CloCkWeRX deleted the feature/planting-rating branch September 1, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rate a planting

2 participants