Guest User

Untitled

a guest
Apr 8th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def update
  2. @user = User.find_by_id(current_user.id)
  3. @user.user_info.attributes = params[:user_info]
  4. @user.password = params[:user][:password]
  5. @user.password_confirmation = params[:user][:password_confirmation]
  6.  
  7. if @user.save_with_associations
  8. redirect_to(edit_user_path(@user))
  9. else
  10. @user_info = @user.user_info
  11. render :action => "edit"
  12. end
Add Comment
Please, Sign In to add comment