Skip to content

Instantly share code, notes, and snippets.

@iHiD
Created April 9, 2013 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iHiD/5347251 to your computer and use it in GitHub Desktop.
Save iHiD/5347251 to your computer and use it in GitHub Desktop.
Tim's importer
rows = CSV.do_stuff_here
rows.each do |row|
user = User.new
user.name = row[:name]
user.mobile = ""
user.email = row[:email]
user.password = row[:password]
user.admin = true
user.save!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment