From f650d1b8fa1eed651ca65dde0601bcfb2af045a3 Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Sun, 7 Sep 2025 03:54:20 +0000 Subject: [PATCH] Change garden sort order to be by name and planting by most to lease recent when creating an activity --- app/views/activities/_form.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/activities/_form.html.haml b/app/views/activities/_form.html.haml index 879117f8b..8ff9fae2e 100644 --- a/app/views/activities/_form.html.haml +++ b/app/views/activities/_form.html.haml @@ -27,13 +27,13 @@ .row .col-md-4 - = f.collection_radio_buttons(:garden_id, @activity.owner.gardens.active, + = f.collection_radio_buttons(:garden_id, @activity.owner.gardens.active.order_by_name, :id, :name, label: 'Is this for a specific garden?') = link_to "Add a garden.", new_garden_path .col-md-4 - = f.collection_radio_buttons(:planting_id, @activity.owner.plantings.active, + = f.collection_radio_buttons(:planting_id, @activity.owner.plantings.active.recent, :id, :crop_name, label: 'Is this for a specific planting?') = link_to "Add a planting.", new_planting_path