From a034172b24cde31bac0f18b842db8c76cfb80bb1 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 4 Oct 2010 15:36:16 +0000 Subject: Refactor: convert UsersController to resource git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4231 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/users/edit.rhtml | 2 +- app/views/users/index.rhtml | 2 +- app/views/users/show.rhtml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app') diff --git a/app/views/users/edit.rhtml b/app/views/users/edit.rhtml index f5538c167..0d9cb0133 100644 --- a/app/views/users/edit.rhtml +++ b/app/views/users/edit.rhtml @@ -1,5 +1,5 @@
-<%= link_to l(:label_profile), {:controller => 'users', :action => 'show', :id => @user}, :class => 'icon icon-user' %> +<%= link_to l(:label_profile), user_path(@user), :class => 'icon icon-user' %> <%= change_status_link(@user) %>
diff --git a/app/views/users/index.rhtml b/app/views/users/index.rhtml index 804678959..69ad73747 100644 --- a/app/views/users/index.rhtml +++ b/app/views/users/index.rhtml @@ -30,7 +30,7 @@ <% for user in @users -%> <%= %w(anon active registered locked)[user.status] %>"> - <%= avatar(user, :size => "14") %><%= link_to h(user.login), :action => 'edit', :id => user %> + <%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %> <%= h(user.firstname) %> <%= h(user.lastname) %> <%= mail_to(h(user.mail)) %> diff --git a/app/views/users/show.rhtml b/app/views/users/show.rhtml index a2f90226c..afab71110 100644 --- a/app/views/users/show.rhtml +++ b/app/views/users/show.rhtml @@ -1,5 +1,5 @@
-<%= link_to(l(:button_edit), {:controller => 'users', :action => 'edit', :id => @user}, :class => 'icon icon-edit') if User.current.admin? %> +<%= link_to(l(:button_edit), edit_user_path(@user), :class => 'icon icon-edit') if User.current.admin? %>

<%= avatar @user, :size => "50" %> <%=h @user.name %>

-- cgit v1.2.3