Reputation: 1706
At the time i have defined two search forms in my app:
How you can see the second form doesnt look so nice and disturbs my layout. So my aim is to style the working form (second form) like the first form.
But i have my problems to define the html in the rails form:
First form:
<form class="navbar-search pull-left">
<input type="text" class="search-query" placeholder="Suche">
</form>
Second Form:
<%= form_tag patients_path, :method => 'get' do %>
<%= text_field_tag :search, params[:search] %>
<%= submit_tag "Search", :name => nil %>
<% end %>
Upvotes: 0
Views: 70
Reputation: 5983
A good first start would be:
<%= form_tag patients_path, :method => 'get', {class: ["navbar-search", "pull-left"]} do %>
<%= text_field_tag :search, params[:search], class: "search-query" %>
<%= submit_tag "Search", :name => nil %>
<% end %>
Upvotes: 1