Make sure we get the display name from the database when building

the form submission URL as the user might just have tried to change
it in which case the one in the user object will be the new one.
This commit is contained in:
Tom Hughes 2007-06-11 08:59:33 +00:00
parent 0d597c1771
commit 3da913748c

View file

@ -1,6 +1,6 @@
<h2>Edit details:</h2>
<%= error_messages_for 'user' %>
<% form_tag :controller => 'user', :action => 'edit', :display_name => @user.display_name do %>
<% form_tag :controller => 'user', :action => 'edit', :display_name => User.find(@user.id).display_name do %>
<table>
<tr><td>display name</td><td><%= text_field :user, :display_name, :value => @user.display_name %></td></tr>
<tr><td valign="top">description</td><td><%= text_area :user, :description, :value => @user.description %></td></tr>