Class: Binda::User

Inherits:
ApplicationRecord show all
Defined in:
app/models/binda/user.rb

Class Method Summary collapse

Class Method Details

.create_super_admin_userObject



8
9
10
11
12
13
14
15
16
# File 'app/models/binda/user.rb', line 8

def self.create_super_admin_user
STDOUT.puts "What is your email? [[email protected]]"
 username = STDIN.gets.strip
 username = '[email protected]' if username.blank?
STDOUT.puts "What is your password? [password]"
 password = STDIN.gets.strip
 password = 'password' if password.blank?
 User.create!( email: username, password: password, password_confirmation: password, is_superadmin: true )
end