You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
430 B
17 lines
430 B
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
|