app/controllers/settings_controller.rb
##
# handles shared functionality for upgrading and demoting admin status
handles shared functionality for upgrading and demoting admin status
handles shared functionality for upgrading and demoting admin status
def update_admin
    respond_to do |format|
      format.json do
        @user = User.find_by username: username_param[:username]
        ensure_user_exists(params[:username]) { return }
        yield
      end
    end
  end
def update_admin respond_to do | format | format . json do @user = User . find_by username : username_param [ :username ] ensure_user_exists ( params [ :username ] ) { return } yield end end end
handles shared functionality for upgrading and demoting admin status
handles shared functionality for upgrading and demoting admin status