add pagy, improve checks#index
This commit is contained in:
parent
c44c9ccaba
commit
6d3a269231
11 changed files with 274 additions and 10 deletions
|
|
@ -4,4 +4,8 @@ class Check < ApplicationRecord
|
|||
enum :level, %i[A AA AAA]
|
||||
|
||||
has_rich_text :success_criterion_html
|
||||
|
||||
scope :search, lambda { |term|
|
||||
joins("INNER JOIN action_text_rich_texts ON action_text_rich_texts.record_id = checks.id AND record_type = 'Check'").where('checks.name LIKE :term OR action_text_rich_texts.body LIKE :term', term: "%#{term}%")
|
||||
}
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue