Files
Brenda Wallace 12633ac9e7 Refactor nursery management: Introduce NurseryScoped concern and restructure nursery-related controllers
- Created NurseryScoped module to handle nursery authentication and setup.
- Refactored GardensController to remove nursery-related actions and utilize the new NurseryScoped.
- Added new Nurseries::DeclinesController for handling nursery decline actions.
- Introduced Nurseries::LeftoversController for managing leftover plantings in the nursery.
- Created Nurseries::PlantOutsController for handling the planting out of seedlings from the nursery.
- Added NurseriesController to manage nursery display and creation.
- Updated routes to reflect new nursery structure and actions.
- Modified views to accommodate new nursery management flow and updated links.
- Enhanced models to support nursery functionality, including plant_out and finish_leftovers methods.
- Updated tests to reflect changes in nursery handling and ensure functionality.
2026-10-17 17:38:38 +13:00

14 lines
385 B
Ruby

# frozen_string_literal: true
# A member saying they don't raise seedlings, so we stop asking about a nursery.
module Nurseries
class DeclinesController < ApplicationController
before_action :authenticate_member!
def create
current_member.decline_nursery!
redirect_to member_gardens_path(current_member), notice: t('gardens.nursery_declined')
end
end
end