From 2e212d2265e9b04ca97fcfcb273b0fc1096abbeb Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Wed, 31 Aug 2011 13:58:03 +0200 Subject: [PATCH] correct use of authorized? helper in header --- app/views/layouts/rails_admin/_header.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/rails_admin/_header.html.haml b/app/views/layouts/rails_admin/_header.html.haml index 57a783e0d4..0e95d507f5 100644 --- a/app/views/layouts/rails_admin/_header.html.haml +++ b/app/views/layouts/rails_admin/_header.html.haml @@ -5,5 +5,5 @@ %ul.wat-cf %li= link_to header_icon(:config, t('admin.dashboard.name')), dashboard_path %li= link_to header_icon(:home, t('home.name').capitalize), (root_path rescue '/') - %li= link_to header_icon(:account, _current_user.email), (edit_path(:user, _current_user) rescue '#') if authorized?(:edit, _current_user) + %li= link_to header_icon(:account, _current_user.email), (edit_path(:user, _current_user) rescue '#') if authorized?(:edit, nil, _current_user) %li= link_to header_icon(:logout, t("admin.credentials.log_out")), (destroy_user_session_path rescue '/users/sign_out'), :method => (Devise.sign_out_via rescue :delete)