diff --git a/app/controllers/iqdb_queries_controller.rb b/app/controllers/iqdb_queries_controller.rb index de0628976..4fa85fcfe 100644 --- a/app/controllers/iqdb_queries_controller.rb +++ b/app/controllers/iqdb_queries_controller.rb @@ -19,6 +19,7 @@ protected @download = Iqdb::Download.new(params[:url]) @download.download_from_source @download.find_similar + @results = @download.matches render :layout => false, :action => "create_by_url" end diff --git a/app/views/iqdb_queries/create_by_url.html.erb b/app/views/iqdb_queries/create_by_url.html.erb index 5c3d96a41..f66fb5b58 100644 --- a/app/views/iqdb_queries/create_by_url.html.erb +++ b/app/views/iqdb_queries/create_by_url.html.erb @@ -1,6 +1,6 @@ -<% if @download.any? %> +<% if @results.any? %>

Similar

- <% @download.each do |match| %> + <% @results.each do |match| %> <%= PostPresenter.preview(Post.find(match.post_id)) %> <% end %> <% else %>