From 64073bdae8a2ff5e025fd721c893602ff5390c51 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 18 Sep 2020 07:16:04 -0700 Subject: [PATCH] Limit weapon search to 10 at once --- app/controllers/api/v1/search_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/v1/search_controller.rb b/app/controllers/api/v1/search_controller.rb index f426352..20086cc 100644 --- a/app/controllers/api/v1/search_controller.rb +++ b/app/controllers/api/v1/search_controller.rb @@ -2,7 +2,7 @@ class Api::V1::SearchController < ApplicationController def index logger.debug params if params[:query].present? - @weapons = Weapon.search(params[:query]) + @weapons = Weapon.search(params[:query]).limit(10) else @weapons = Weapon.all end