combining bootstrap classes with search_form_for

20 views
Skip to first unread message

Joe Guerra

unread,
Feb 8, 2018, 6:17:02 PM2/8/18
to Ruby on Rails: Talk
I've setup ransack to do some full text search...

but the search text box isn't formated with bootstrap styling.  I've pasted my code below.  The top has the ransack search , below the bootstrap styling (need to combine them).  

Any hints?



 <div class="navbar-form navbar-left" >

<%= search_form_for @search do |f| %>

<div class="field" >

<%#= f.label :title_or_template_cont %>



<%= f.text_field :location_or_desc_cont , placeholder: "Search" %>

<!--
<div class="actions">
-->
<%= f.submit "Search" %>
<!--
</div>
-->

</div>

<% end %>
</div>

<!--- bootstrap styled search box below, need to combine style with above search -->

<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
</form>

Thanks!
Joe

Joe Guerra

unread,
Feb 16, 2018, 11:44:17 AM2/16/18
to Ruby on Rails: Talk
nevermind.
Reply all
Reply to author
Forward
0 new messages