mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Add search scope from searchable concern [SCI-5551]
This commit is contained in:
parent
e953666762
commit
e058adab08
1 changed files with 4 additions and 2 deletions
|
@ -104,8 +104,10 @@ class ReportDatatable < CustomDatatable
|
|||
end
|
||||
|
||||
def filter_records(records)
|
||||
records.where('project_name ILIKE :q OR reports.name ILIKE :q OR reports.description ILIKE :q',
|
||||
{ q: "%#{dt_params.dig(:search, :value)}%" })
|
||||
records.where_attributes_like(
|
||||
['project_name', 'reports.name', 'reports.description'],
|
||||
dt_params.dig(:search, :value)
|
||||
)
|
||||
end
|
||||
|
||||
# ==== Insert 'presenter'-like methods below if necessary
|
||||
|
|
Loading…
Reference in a new issue