Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rails search field
<%= form_tag('/search', local: true, method: :get, class: 'form-inline' ) do %>
<%= text_field_tag(:q, nil, data: { behavior: 'autocomplete' }, placeholder: 'Search', class: 'form-control mr-sm-2') %>
<%= button_tag('Search', class: 'btn btn-outline-success my-2 my-sm-0', type: 'submit') %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment