/ Published in: Ruby
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
# e.g. Copy existing data from users table to newly created members table userMove = User.find(:all) userMove.each do |t| Member.create :first_name => t.forename, :last_name => t.surname, :email => t.email, :password => t.password end