Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change navbar-header in rails admin

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.

like image 787
Pooja Mokariya Avatar asked Jan 18 '16 10:01

Pooja Mokariya


1 Answers

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

like image 80
Chetan Avatar answered Nov 14 '22 23:11

Chetan