Updated PreviewCard, Group search_for functions to return max 25

• Updated:
- PreviewCard, Group search_for functions to return max 25
This commit is contained in:
mgabdev 2020-11-03 13:10:02 -06:00
parent 367a5b77e7
commit 75e3ac6c7d
2 changed files with 2 additions and 2 deletions

@ -61,7 +61,7 @@ class Group < ApplicationRecord
after_create :add_owner_to_accounts
class << self
def search_for(term, limit = 100, offset = 0)
def search_for(term, limit = 25, offset = 0)
pattern = sanitize_sql_like(term.strip) + '%'
Group.where('lower(title) like lower(?) AND is_archived=false AND is_visible=true', pattern)

@ -57,7 +57,7 @@ class PreviewCard < ApplicationRecord
end
class << self
def search_for(term, limit = 100, offset = 0)
def search_for(term, limit = 25, offset = 0)
pattern = '%' + sanitize_sql_like(term.strip) + '%'
PreviewCard.where(