Class: AdminUser

Inherits:
Upmin::Model
  • Object
show all
Defined in:
app/upmin/admin_user.rb

Instance Method Summary collapse

Instance Method Details

#update_password(new_password) ⇒ Object


7
8
9
10
11
12
13
14
15
# File 'app/upmin/admin_user.rb', line 7

def update_password(new_password)
  object.password = new_password

  if object.save
    'Password updated succesfully'
  else
    object.errors.full_messages.to_sentence
  end
end