Fix #3696: API: handle boolean params consistently
* Use ApplicationRecord#attribute_matches to handle boolean attributes consistently in search methods. * Add support for searching various boolean attributes that previously weren't supported.
This commit is contained in:
@@ -17,6 +17,8 @@ class NoteVersion < ApplicationRecord
|
||||
q = q.where(note_id: params[:note_id].split(",").map(&:to_i))
|
||||
end
|
||||
|
||||
q = q.attribute_matches(:is_active, params[:is_active])
|
||||
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user