<% @searches.each do |search| %> <%= link_to search.search_type, overview_searches_path(search_type: search.search_type), class: "type-link type-link-#{@search_types.index(search.search_type)}" %> <% name = Searchjoy.query_name ? Searchjoy.query_name.call(search) : search.query %> <% if Searchjoy.query_url %> <%= link_to name, Searchjoy.query_url.call(search), target: "_blank" %> <% else %> <%= name %> <% end %> <% if search.converted_at %> <%= search.convertable ? (Searchjoy.conversion_name ? Searchjoy.conversion_name.call(search.convertable) : "#{search.convertable_type} #{search.convertable_id}") : "Converted" %> <% end %> <%= time_ago_in_words search.created_at %> ago
<%= pluralize search.results_count, "result" %>
<% end %>