Skip to content

Instantly share code, notes, and snippets.

@wesgarrison
Created December 22, 2010 04:47
Show Gist options
  • Save wesgarrison/751112 to your computer and use it in GitHub Desktop.
Save wesgarrison/751112 to your computer and use it in GitHub Desktop.
namespace :myapp do
task :reset_passwords => :environment do
desc 'set all passwords to Test1234 to login locally'
exit(1) unless Rails.env.development?
User.all.each do |user|
user.password = user.password_confirmation = "Test1234"
user.save
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment