Added some comments/docs to Crop.create_from_csv

This commit is contained in:
Skud
2013-10-17 22:49:57 +11:00
parent c46e19e43e
commit ed01c6fb29

View File

@@ -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