Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 17 lines (11 sloc) 0.37 kb
2cfa9d9 @qrush Add support scripts
qrush authored
1 #!/usr/bin/env ruby
2
3 from_email, to_email = *ARGV
4
5 if from_email.nil? || to_email.nil?
6 abort "Usage: script/change_email [FROM_EMAIL] [TO_EMAIL]"
7 end
8
9 ENV['RAILS_ENV'] ||= 'production'
10 require_relative '../config/environment'
11
12 from_user = User.find_by_email!(from_email)
13 from_user.email = to_email
14 from_user.save!
15
16 puts "#{from_user.name}'s email is now: #{to_email}"
Something went wrong with that request. Please try again.