Commit c74850c
Changed files (2)
app
controllers
config
locales
app/controllers/profiles_controller.rb
@@ -11,9 +11,8 @@ class ProfilesController < ApplicationController
end
def update
-# @user = User.find_by(username: params[:id]) if @current_user.username == params[:id]
if @current_user.profile.update_attributes(profile_params)
- flash[:notice] = "Updated profile. This is how your public profile appears."
+ flash[:notice] = t("profiles.edit.profile_updated")
redirect_to "/u/#{params[:id]}"
else
render 'edit'
@@ -23,7 +22,7 @@ class ProfilesController < ApplicationController
private
def profile_params
- params.require(:profile).permit([:gender, :social_tolerance])
+ params.require(:profile).permit(:gender, :social_tolerance)
end
end
config/locales/en.yml
@@ -50,6 +50,7 @@ en:
high: High
social_tolerance: Social Tolerance
save: Save Profile
+ profile_updated: "Profile updated. This is how your public profile appears."
show:
exercise_header: Exercise
maximum_achieved: Maximum Achieved