Add a limit to the number of items for the Item Getting Guide
Just to make it harder to willfully overload the server or whatever!
This commit is contained in:
parent
1b03c2caed
commit
a8648fc9c1
1 changed files with 2 additions and 1 deletions
|
@ -114,7 +114,8 @@ class ItemsController < ApplicationController
|
|||
|
||||
def sources
|
||||
item_ids = params[:ids].split(",")
|
||||
@items = Item.where(id: item_ids).includes(:nc_mall_record).order(:name)
|
||||
@items = Item.where(id: item_ids).includes(:nc_mall_record).order(:name).
|
||||
limit(50)
|
||||
|
||||
if @items.empty?
|
||||
render file: "public/404.html", status: :not_found, layout: nil
|
||||
|
|
Loading…
Reference in a new issue