Hi Dida,
The way I have done it is to add code table type stuff into a
migration. For example:
def self.up
countries=[["AD","Andorra"],["AE","United Arab Emirates"],
["AF","Afghanistan"],["AG","Antigua and Barbuda"],....etc etc.....
["ZA","South Africa"],["ZM","Zambia"],["ZW","Zimbabwe"]]
countries.sort!{|a,b| a[1]<=>b[1]}
countries.each do |c|
Country.create(:code=>c[0],:name=>c[1])
end
end
def self.down
Country.delete_all
end
You can also import csv files.
Not sure if that helps you
Cheers
George
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Heroku" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/heroku?hl=en
-~----------~----~----~----~------~----~------~--~---