Search Bar won't render in TopBar ZURB Foundation

I'm currently using four partials
_usernavbar.html.erb
_adminnavbar.html.erb
_landingnavbar.html.erb
_search_box.html.erb

  <% if user_signed_in? %>
      <%= render 'navigation_partials/usernavbar' %>
  <% elsif admin_user_signed_in? %>
      <%= render 'navigation_partials/adminnavbar' %>
  <% else %>
      <%= render 'navigation_partials/landingnavbar' %>
  <% end %>

<% content_for :search do %>
    <div class="large-4 small-9 columns">
      <%= search_form_for @search do |f| %>
          <%= f.text_field :title_cont, placeholder: 'Search'
%>
          </div>
          <div class="large-1 large-pull-1 small-3 columns">
            <%= f.submit 'Search', class: 'button small
search-button-height' %>
          </div>
      <% end %>
<% end %>

I'm trying to get the search bar to render in all of the separate
partial views, but <%= yield(:search) %> only shows the search bar
inside of the body, and not inside of the TopBar. Using a normal html
search bar, it works perfectly fine btw.