—€ this.

This commit is contained in:
nilsding 2014-11-04 15:56:00 +01:00
parent 81055c49c5
commit f515bf7bea
2 changed files with 6 additions and 2 deletions

View File

@ -8,7 +8,7 @@ class UserController < ApplicationController
end
def update
params.permit(:display_name)
params.require(:display_name)
current_user.display_name = params[:display_name]
current_user.save!
redirect_to edit_user_profile_path

View File

@ -1,4 +1,8 @@
.container.j2-page
= render 'settings_tabs'
.col-md-9.col-xs-12.col-sm-9
%i TODO
= bootstrap_form_for(update_user_profile_path, method: "patch") do |f|
= f.text_field :display_name, label: "Your name"
= f.submit