Admin can't change own password in admin panel
Created by: hugelgupf
Relevant output of production.log:
ActiveRecord::StatementInvalid (Mysql2::Error: Column 'admin' cannot be null: UPDATE `users` SET `admin` = NULL, `encrypted_password` = '$2a$10$CdXVbbxfWUMs4rpwR3sVF.8sDpO9cAxnRmAFMozztx1IDu1QgZQJK', `updated_at` = '2014-02-18 01:57:33' WHERE `users`.`id` = 3):
app/controllers/admin/users_controller.rb:74:in `block in update'
app/controllers/admin/users_controller.rb:73:in `update'
app/controllers/application_controller.rb:57:in `set_current_user_for_thread'
My best guess is that this is because the Admin-checkbox is greyed out for yourself with a note that "you can't remove your own admin rights." Leads to admin = NULL in this statement, which leads to a 500 'something went wrong' page.