_search.html.haml 357 Bytes
Newer Older
1
.search
2
  = form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
3 4 5 6 7 8 9 10 11
    = text_field_tag "search", nil, placeholder: "Search", class: "search-input"

:javascript
  $(function(){
    $("#search").autocomplete({
      source: #{raw search_autocomplete_source},
      select: function(event, ui) { location.href = ui.item.url }
    });
  });