mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-26 10:45:04 -04:00
Added some comments/docs to Crop.create_from_csv
This commit is contained in:
@@ -99,6 +99,14 @@ class Crop < ActiveRecord::Base
|
||||
return interesting_crops
|
||||
end
|
||||
|
||||
# Crop.create_from_csv(row)
|
||||
# used by db/seeds.rb and rake growstuff:import_crops
|
||||
# CSV fields:
|
||||
# - system_name (required)
|
||||
# - scientific name (optional, can be picked up from parent if it has one)
|
||||
# - en_wikipedia_url (required)
|
||||
# - parent (system name, optional)
|
||||
|
||||
def Crop.create_from_csv(row)
|
||||
system_name,scientific_name,en_wikipedia_url,parent = row
|
||||
|
||||
|
||||
Reference in New Issue
Block a user