Files
danbooru/app/controllers/iqdb_queries_controller.rb
2018-06-19 14:16:12 -07:00

13 lines
272 B
Ruby

class IqdbQueriesController < ApplicationController
respond_to :html, :json, :xml
def show
if params[:matches]
@matches = JSON.parse(params[:matches])
@matches = @matches.map {|x| [Post.find(x[0]), x[1]]}
end
respond_with(@matches)
end
end