Commit cacb978ebfc742b16ed1889ac93abd714a9a3fc4
1 parent
740b6835
Exists in
master
and in
28 other branches
ActionItem315: fixed and improved error reporting for edit infos
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1699 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
6 changed files
with
18 additions
and
4 deletions
Show diff stats
app/controllers/my_profile/profile_editor_controller.rb
... | ... | @@ -11,8 +11,9 @@ class ProfileEditorController < MyProfileController |
11 | 11 | # edits the profile info (posts back) |
12 | 12 | def edit |
13 | 13 | if request.post? |
14 | - profile.info.update_attributes(params[:info]) | |
15 | - redirect_to :action => 'index' | |
14 | + if profile.info.update_attributes(params[:info]) | |
15 | + redirect_to :action => 'index' | |
16 | + end | |
16 | 17 | else |
17 | 18 | @info = profile.info |
18 | 19 | render :action => @info.class.name.underscore | ... | ... |
app/models/person.rb
app/models/user.rb
app/views/profile_editor/organization_info.rhtml
app/views/profile_editor/person_info.rhtml
app/views/shared/user_menu.rhtml
... | ... | @@ -8,8 +8,8 @@ |
8 | 8 | <img src="<%= |
9 | 9 | (current_user.person.image)? |
10 | 10 | current_user.person.image.public_filename(:icon) : "/images/icons-bar/photo.png" |
11 | - %>" alt="<%= current_user.login %> Icon-Photo" title="" height="20" border="0"/> | |
12 | - <span><%= _("%s's Menu") % current_user.login %></span> | |
11 | + %>" alt="<%= current_user.name %> Icon-Photo" title="" height="20" border="0"/> | |
12 | + <span><%= _("%s's Menu") % current_user.name %></span> | |
13 | 13 | </div> |
14 | 14 | |
15 | 15 | <div id="user_menu_ul"> | ... | ... |