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:
parent
367a5b77e7
commit
75e3ac6c7d
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user