Change email address for a diaspora user from rails console

By | February 1, 2016

Just a tip on how to update a pod users email address if you need. In my example I need to edit production postgres DB user #5 and change their email.

cd diaspora

RAILS_ENV=production DB=postgres rails c

user = User.find_by(id: 5)

user.email = ‘newemail@example.org’

user.save

And that is it. You can of course use this to edit other user. items where needed.

One thought on “Change email address for a diaspora user from rails console

Leave a Reply

Your email address will not be published. Required fields are marked *