- content_for :navbar
  .collapse.navbar-collapse#navbar-collapse
    ul.nav.navbar-nav
      li = link_to '日報作成', new_nippo_path
      li = link_to 'テンプレート編集', template_path
    ul.nav.navbar-nav.navbar-right
      li = link_to 'ログアウト', users_sign_out_path

- content_for :content
  = yield

= render template: 'layouts/application'

- content_for :navbar
  .collapse.navbar-collapse#navbar-collapse
    ul.nav.navbar-nav
      li class="#{current_page?(controller: 'nippos', action: 'new') ? 'active' : nil}"
        = link_to '日報作成', new_nippo_path
      li class="#{current_page?(controller: 'templates', action: 'show') ? 'active' : nil}"
        = link_to 'テンプレート編集', template_path
    ul.nav.navbar-nav.navbar-right
      li = link_to 'ログアウト', users_sign_out_path

- content_for :content
  = yield

= render template: 'layouts/application'

Add active class on menu
Add active class on menu

nisshiee/nippo,ystkmnm/nippo,ystkmnm/nippo,speee/nippo,nisshiee/nippo,speee/nippo,ystkmnm/nippo,nisshiee/nippo,speee/nippo