Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel O'Connor
bb8014a231 Allow edit of more attributes 2024-07-14 04:55:26 +00:00
Daniel O'Connor
c189fa94a7 Allow edit of more attributes 2024-07-14 04:55:13 +00:00
2 changed files with 5 additions and 0 deletions

View File

@@ -194,6 +194,7 @@ class CropsController < ApplicationController
params.require(:crop).permit(
:name, :en_wikipedia_url,
:parent_id, :perennial,
:sowing_method, :description, :sun_requirements,
:request_notes, :reason_for_rejection,
:rejection_notes,
scientific_names_attributes: %i(scientific_name _destroy id)

View File

@@ -47,6 +47,10 @@
%span.help-block
Link to the crop's page on the English language Wikipedia (required).
= f.text_area :description
= f.text_field :sun_requirements
= f.text_field :sowing_method
-# Only crop wranglers see the crop hierarchy (for now)
- if can? :wrangle, @crop
= f.collection_select(:parent_id, Crop.all.order(:name), :id, :name,