mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-31 04:08:21 -04:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d57ca1b4bb | ||
|
|
dc4133abd2 | ||
|
|
0b4bdc6946 | ||
|
|
3d308db0d9 | ||
|
|
bfa1ae3ae2 | ||
|
|
71ef2c058b | ||
|
|
b42385be14 |
@@ -113,7 +113,12 @@ class CropsController < ApplicationController
|
|||||||
@crop.approval_status = "pending"
|
@crop.approval_status = "pending"
|
||||||
end
|
end
|
||||||
|
|
||||||
notify_wranglers if Crop.transaction { @crop.save && save_crop_names }
|
if Crop.transaction { @crop.save && save_crop_names }
|
||||||
|
notify_wranglers
|
||||||
|
else
|
||||||
|
@crop.alternate_names.build
|
||||||
|
@crop.scientific_names.build
|
||||||
|
end
|
||||||
|
|
||||||
respond_with @crop
|
respond_with @crop
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
%h2 Basic information
|
%h2 Basic information
|
||||||
|
|
||||||
.form-group#new_crop
|
.form-group#new_crop
|
||||||
= f.text_field :name
|
= f.text_field :name, required: true
|
||||||
%span.help-block
|
%span.help-block
|
||||||
The common name for the crop, in English (required).
|
The common name for the crop, in English (required).
|
||||||
- if can? :wrangle, @crop
|
- if can? :wrangle, @crop
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
- unless @crop.approved?
|
- unless @crop.approved?
|
||||||
= link_to 'Search wikipedia', "https://en.wikipedia.org/w/index.php?search=#{@crop.name}", target: '_blank'
|
= link_to 'Search wikipedia', "https://en.wikipedia.org/w/index.php?search=#{@crop.name}", target: '_blank'
|
||||||
= f.text_field :en_wikipedia_url, id: "en_wikipedia_url", label: 'Wikipedia URL'
|
= f.url_field :en_wikipedia_url, id: "en_wikipedia_url", label: 'Wikipedia URL'
|
||||||
%span.help-block
|
%span.help-block
|
||||||
Link to the crop's page on the English language Wikipedia (required).
|
Link to the crop's page on the English language Wikipedia (required).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user