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.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/38a078731a2176f53036ec1103d55c26%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to