form_tag controller articles action search method get class navbar-for

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<%= form_tag ({:controller => 'articles', :action => 'search', method: "get", class: "navbar-form navbar-left", role: "search"}) do %>
<div class="form-group">
<%= text_field_tag (:search), "", class:"form-control", autofocus: true, placeholder: "Search" %>
</div>
<%= submit_tag( "Search", class: "btn btn-default" )%>
<%= link_to "Add item", new_article_path, class: "btn btn-default" %>
<% end %>