change navbar-header in rails admin
Asked Answered
M

1

5

I used rails-admin. I am getting name "myappname admin" in navbar-header bar. I want to change it with "myapp" name.I tried to change it with customize view file

navigation.html.haml

.container-fluid
  .navbar-header
    %button.navbar-toggle.collapsed{ type: 'button', data: { toggle: 'collapse', target: '#secondary-navigation' } }
      %span.sr-only= t('admin.toggle_navigation')
      %span.icon-bar
      %span.icon-bar
      %span.icon-bar
    %a.navbar-brand.pjax{href: dashboard_path}
      / = _get_plugin_name[0] || 'Rails'
      = "myapp"
      / %small= _get_plugin_name[1] || 'Admin'
  .collapse.navbar-collapse#secondary-navigation
    = render partial: 'layouts/rails_admin/secondary_navigation'

but its not changing my app name.

Machicolation answered 18/1, 2016 at 10:41 Comment(0)
H
11

If I am correct I think you want to set the application name while using rails-admin

i.e you can try out this

RailsAdmin.config do |config|

     config.main_app_name = ["Cool app", "BackOffice"]

end

Huba answered 18/1, 2016 at 10:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.