Sha256: 49d62c69da095a2f1867c296d5d4d3e409616a3d623309772a3d46493e532b27
Contents?: true
Size: 401 Bytes
Versions: 9
Compression:
Stored size: 401 Bytes
Contents
users = [ {email: 'admin@example.com', password: 'password', password_confirmation: 'password'} ] users.each do |user| db_user = AdminUser.where(email: user[:email]).first_or_initialize(user) if db_user.valid? if db_user.new_record? db_user.save! else db_user.update_attributes! user end puts "User #{db_user.email} updated with password: #{db_user.password}" end end
Version data entries
9 entries across 9 versions & 1 rubygems