How to change password manually

Public, Command Line, Shortcuts

nagano564

Created: Dec 08, 2017     Updated: Dec 09, 2017


rails c in development
heroku run rails console in production

If user exists

var = User.first OR var = User.find(id number)
var.password = "password"
var.password_confirmation = "password"
var.confirmed_at = Date.now

var.save

If user doesn't exists

kenny = User.new(email: "someemail@blah.com", password: "blah", passord_confirmation: "blah")