This commit is contained in:
r888888888
2014-05-15 22:14:08 -07:00
committed by Toks
parent f2e2ae35b9
commit a66d432925
2 changed files with 3 additions and 2 deletions

View File

@@ -19,6 +19,7 @@ protected
@download = Iqdb::Download.new(params[:url]) @download = Iqdb::Download.new(params[:url])
@download.download_from_source @download.download_from_source
@download.find_similar @download.find_similar
@results = @download.matches
render :layout => false, :action => "create_by_url" render :layout => false, :action => "create_by_url"
end end

View File

@@ -1,6 +1,6 @@
<% if @download.any? %> <% if @results.any? %>
<h3>Similar</h3> <h3>Similar</h3>
<% @download.each do |match| %> <% @results.each do |match| %>
<%= PostPresenter.preview(Post.find(match.post_id)) %> <%= PostPresenter.preview(Post.find(match.post_id)) %>
<% end %> <% end %>
<% else %> <% else %>