From a39c304fac6d06ea4701da360ab1256b11cda884 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 3 Jan 2018 15:06:55 +1300 Subject: [PATCH 1/2] Fix ordering of crops' parent on form --- app/views/crops/_form.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/crops/_form.html.haml b/app/views/crops/_form.html.haml index c391c79d2..a8cfe0bea 100644 --- a/app/views/crops/_form.html.haml +++ b/app/views/crops/_form.html.haml @@ -51,7 +51,7 @@ .form-group = f.label :parent_id, 'Parent crop', class: 'control-label col-md-2' .col-md-8 - = collection_select(:crop, :parent_id, Crop.all, :id, :name, { include_blank: true }, class: 'form-control') + = collection_select(:crop, :parent_id, Crop.all.order(:name), :id, :name, { include_blank: true }, class: 'form-control') %span.help-block Optional. For setting up crop hierarchies for varieties etc. From d86de897c74aded2180c312badc8657c7317ae0d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 3 Jan 2018 15:12:09 +1300 Subject: [PATCH 2/2] Wrap long line --- app/views/crops/_form.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/crops/_form.html.haml b/app/views/crops/_form.html.haml index a8cfe0bea..c16041f97 100644 --- a/app/views/crops/_form.html.haml +++ b/app/views/crops/_form.html.haml @@ -51,7 +51,8 @@ .form-group = f.label :parent_id, 'Parent crop', class: 'control-label col-md-2' .col-md-8 - = collection_select(:crop, :parent_id, Crop.all.order(:name), :id, :name, { include_blank: true }, class: 'form-control') + = collection_select(:crop, :parent_id, Crop.all.order(:name), :id, :name, + { include_blank: true }, class: 'form-control') %span.help-block Optional. For setting up crop hierarchies for varieties etc.