form_tag controller articles action search method get class navbar-for

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
<%= form_tag ({:controller => 'articles', :action => 'search', method: "get", class: "navbar-form navbar-left", role: "search"}) do %>
<!-- <form class="navbar-form navbar-left" role="search"> -->
<div class="form-group">
<!-- <input type="text" class="form-control" placeholder="Search" id = "search_Inp"></input> -->
<%= text_field_tag (:search), "", class:"form-control", autofocus: true, placeholder: "Search" %>
</div>
<%= submit_tag( "Search", class: "btn btn-default" )%>
<!-- <button type="submit" class="btn btn-default" id = "search_Btn">Search</button> -->
<!-- <%= link_to "Search", articles_path, class: "btn btn-default" %> -->
<!--<button type="submit" class="btn btn-default" id = "add_Btn">Add Item</button>-->
<!-- <%= form_tag({:controller => 'articles', :action => 'new'}) do %> -->
<%= link_to "Add item", new_article_path, class: "btn btn-default" %>
<!-- <% end %> -->
<!-- </form> -->
<% end %>