mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-08 21:52:36 +01:00
Add first_name, last_name, and display_name to the User and make first and last names editable via the preferences interface. The display_name attribute is used in the upper right-hand corner of the standard layout and falls back to use the login if neither first_name of last_name are set.
This is the beginning of Tony Shadwick's request http://www.rousette.org.uk/projects/forums/viewthread/70/ git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@319 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
ba3757f29e
commit
6fa8439c4a
9 changed files with 72 additions and 9 deletions
|
|
@ -69,6 +69,8 @@ class UserController < ApplicationController
|
|||
"admin_email" => "#{params['prefs']['admin_email']}",
|
||||
"refresh" => "#{params['prefs']['refresh']}"
|
||||
}
|
||||
@user.first_name = params['user']['first_name']
|
||||
@user.last_name = params['user']['last_name']
|
||||
if @user.save
|
||||
redirect_to :action => 'preferences'
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue