最佳答案
这可以通过应对 _secondary_navigation.html.haml 来实现到您应用的 app/view/layouts/rails_admin/_secondary_navigation.html.haml 并按照您想要的方式进行编辑。 还不够吗?
%ul.nav.navbar-nav.navbar-right.root_links
- actions(:root).each do |action|
%li{class: "#{action.action_name}_root_link"}= link_to wording_for(:menu, action), { action: action.action_name, controller: 'rails_admin/main' }, class: "pjax"
- if main_app_root_path = (main_app.root_path rescue false)
%li= link_to t('admin.home.name'), main_app_root_path
- if _current_user
- if user_link = edit_user_link
%li= user_link
- if logout_path.present?
%li= link_to content_tag('span', t('admin.misc.log_out'), class: 'label label-danger'), logout_path, method: logout_method
- if _current_user.respond_to?(:email) && _current_user.email.present?
%li= image_tag "#{(request.ssl? ? 'https://secure' : 'http://www')}.gravatar.com/avatar/#{Digest::MD5.hexdigest _current_user.email}?s=30", style: 'padding-top:5px'
关键是 %li= image_tag "#{(request.ssl? ? 'https://secure' : 'http://www')}.gravatar.com/avatar/#{摘要: :MD5.hexdigest _current_user.email}?s=30", style: 'padding-top:5px'
关于ruby-on-rails - 如何从 rails_admin 中删除图像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29680101/