Files
growstuff/app/models/crop_dismissal.rb
T
Brenda Wallace ef06bab74f Add crop suggestions feature and dashboard enhancements
- Introduced crop suggestions functionality allowing users to receive tailored crop recommendations based on their location and preferences.
- Implemented the ability for users to dismiss specific crop suggestions, preventing them from receiving recommendations for crops they are not interested in.
- Added a location picker for users to set their gardening location, enhancing the accuracy of crop suggestions.
- Enhanced the dashboard to display relevant statistics, including plantings and harvests, with comparisons to previous years.
- Created new views and partials for displaying statistics, crop suggestions, and user interactions on the dashboard.
- Updated routes to accommodate new features related to crop suggestions and member locations.
- Added migrations for new database tables and columns to support crop dismissal and suggestion preferences.
- Developed tests for the new features, ensuring functionality and user experience are maintained.
2026-10-12 19:12:18 +13:00

11 lines
269 B
Ruby

# frozen_string_literal: true
# A crop a member has said does not suit them. The home page leaves it out of
# its suggestions.
class CropDismissal < ApplicationRecord
belongs_to :member
belongs_to :crop
validates :crop_id, uniqueness: { scope: :member_id }
end