Hello, I have a table that holds certain places (cities) in them. Is there a way to pre-populate my database during production with all the cities I want included? My application relies on pre submitted cities to run properly. ( I have about 400 of them) I looked around the internet, and people have been using different approaches to this problem. I don''t want to get steered wrong, so what is the best way to do this? Thank you. -David Zhu -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Seeds are the way to go I guess. See http://ryandaigle.com/articles/2009/5/13/what-s-new-in-edge-rails-database-seeding and http://railscasts.com/episodes/179-seed-data. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Sorry for polluting your inboxes : here''s another technique for directly dumping/loading data from the database (if you''re using mysql). -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Arrrgh!!! http://www.agileweboperations.com/seed-data-in-ruby-on-rails (time to go to bed.... :/) On Wednesday, February 9, 2011 1:47:36 AM UTC+2, Nikos Dimitrakopoulos wrote:> > Sorry for polluting your inboxes : here''s another technique for directly > dumping/loading data from the database (if you''re using mysql).-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.