add iqdb preview

This commit is contained in:
Albert Yi
2018-06-22 15:56:15 -07:00
parent bf9750c826
commit 56b40a0255
7 changed files with 44 additions and 17 deletions

View File

@@ -0,0 +1,9 @@
<% if @results.any? %>
<h3>Similar</h3>
<% @results.each do |match| %>
<%= PostPresenter.preview(Post.find(match["post_id"]), :tags => "status:any", :similarity => match["score"]) %>
<% end %>
<% else %>
<h3>Similar</h3>
<p>No matches found</p>
<% end %>