mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-16 12:40:07 -04:00
[CodeFactor] Apply fixes
This commit is contained in:
@@ -4,8 +4,8 @@ class CropSearchService
|
||||
# Crop.search(string)
|
||||
def self.search(query, page: 1, per_page: 12, current_member: nil)
|
||||
search_params = {
|
||||
page: page,
|
||||
per_page: per_page,
|
||||
page:,
|
||||
per_page:,
|
||||
fields: %i(name^5 alternate_names scientific_names),
|
||||
match: :word_start,
|
||||
boost_by: [:plantings_count],
|
||||
@@ -29,15 +29,15 @@ class CropSearchService
|
||||
}
|
||||
}
|
||||
Crop.search(
|
||||
limit: limit,
|
||||
limit:,
|
||||
load: false,
|
||||
body: body
|
||||
body:
|
||||
)
|
||||
end
|
||||
|
||||
def self.recent(limit)
|
||||
Crop.search(
|
||||
limit: limit,
|
||||
limit:,
|
||||
load: false,
|
||||
boost_by: { created_at: { factor: 100 } } # default factor is 1
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user