class Api::SearchController < ApplicationController
  def show
    @searches = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote)
    render json: @searches, root: :searches
  end
end

class Api::SearchController < ApplicationController
  def show
    @searches = Line.search(params[:term]).joins(:quote).includes(:character, :quote).map(&:quote).uniq!
    render json: @searches, root: :searches
  end
end

Call uniq! to get unique searches deal with perf later
Call uniq! to get unique searches deal with perf later
