Skip to content
Browse files

Link to current_user should work event when User#to_param has been ov…

…erridden.
  • Loading branch information...
1 parent b9f5ff9 commit 096271bdd1c75a93bd7d40f4110aa0c6b69f5576 @gunn gunn committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/views/layouts/rails_admin/_header.html.haml
View
2 app/views/layouts/rails_admin/_header.html.haml
@@ -8,6 +8,6 @@
%li= link_to header_icon(:home, t('home.name').capitalize), main_app_root_path
- if _current_user
- if authorized?(:edit, _current_user.class, _current_user)
- %li= link_to header_icon(:account, _current_user.respond_to?(:email) && _current_user.email), edit_path(_current_user.class.name.underscore.pluralize, _current_user)
+ %li= link_to header_icon(:account, _current_user.respond_to?(:email) && _current_user.email), edit_path(_current_user.class.name.underscore.pluralize, _current_user.id)
- if defined?(Devise)
%li= link_to header_icon(:logout, t('admin.credentials.log_out')), main_app.url_for(:action => 'destroy', :controller => 'devise/sessions'), :method => Devise.sign_out_via

0 comments on commit 096271b

Please sign in to comment.
Something went wrong with that request. Please try again.