class UserGoalsController < ApplicationController before_action :authenticate_user! def update if current_user.update(user_goal_params) redirect_to edit_user_registration_path, notice: "Ziele aktualisiert." else redirect_to edit_user_registration_path, alert: "Fehler beim Speichern." end end private def user_goal_params params.require(:user).permit(:total_required_hours, :weekly_target_hours) end end