class RolifyController < ApplicationController before_action :set_user, only: %i[ show edit update ] def show end def edit end def update if @user.update(user_params) redirect_to root_path, notice: "User was successfully updated." else render :edit, status: :unprocessable_entity end end private def set_user @user = User.find(params[:id]) end def user_params params.require(:user).permit(role_ids: []) end end