Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task :password_change => :environment do
- puts "changing passwords..."
- User.all.each { |user|
- user.password = "123456"
- if user.secondary
- s = user.secondary
- s.password = "123456"
- s.save!
- end
- user.save!
- }
- puts "the password was changed!"
- end
Advertisement
Add Comment
Please, Sign In to add comment