Want everyone on your software team to learn this? Free 14-day trial.
Train my teamcontrollers/profile_controller.rb class ProfileController < ActionController::Base
# Danger: since we are not specifying which parameters should be editable,
# an attack can update any values on the their profile!
def update_username
current_user.update!(params.permit!)
end
end