<% current_committee = nil if local_assigns[:current_committee].nil? %>
<% current_page = nil if local_assigns[:current_page].nil? %>

<div class="sidebar box left">
  <section>
    <h2><%= t("about_section") %></h2>
    <% @pages.where(parent_id: nil).each do |parent_page| %>
      <% if current_page == parent_page %>
        <p><%= parent_page.title %></p>
      <% else %>
        <%= link_to parent_page.title, path_to_page(parent_page) %>
      <% end %>
      <% @pages.where(parent_id: parent_page.id).each do |child_page| %>
        <hr class="child">
        <% if current_page == child_page %>
          <p class="child"><%= child_page.title %></p>
        <% else %>
          <%= link_to child_page.title, path_to_page(child_page), class: "child"%>
        <% end %>
      <% end %>
      <hr>
    <% end %>
  </section>

  <section>
    <h2><%= t("committees_assoiciations") %> </h2>
    <% @committees.each do |committee| %>
      <% if committee == current_committee %>
        <p><%= committee.name %></p>
      <% else %>
        <%= link_to committee.name, committee %>
      <% end %>
      <hr>
    <% end %>
  </section>
</div>

<% current_committee = nil if local_assigns[:current_committee].nil? %>
<% current_page = nil if local_assigns[:current_page].nil? %>

<div class="sidebar box left">
  <section>
    <h2><%= t("about_section") %></h2>
    <% @pages.where(parent_id: nil).each do |parent_page| %>
      <% if current_page == parent_page %>
        <p><%= parent_page.title %></p>
      <% else %>
        <%= link_to parent_page.title, path_to_page(parent_page) %>
      <% end %>
      <hr>
      <% @pages.where(parent_id: parent_page.id).each do |child_page| %>
        <% if current_page == child_page %>
          <p class="child"><%= child_page.title %></p>
        <% else %>
          <%= link_to child_page.title, path_to_page(child_page), class: "child"%>
        <% end %>
        <hr class="child">
      <% end %>
    <% end %>
  </section>

  <section>
    <h2><%= t("committees_assoiciations") %> </h2>
    <% @committees.each do |committee| %>
      <% if committee == current_committee %>
        <p><%= committee.name %></p>
      <% else %>
        <%= link_to committee.name, committee %>
      <% end %>
      <hr>
    <% end %>
  </section>
</div>

Move hr in sidebar partial, looks better
Move hr in sidebar partial, looks better
