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:
@@ -20,6 +20,9 @@ class WikiPageVersion < ApplicationRecord
|
||||
q = q.where("wiki_page_id = ?", params[:wiki_page_id].to_i)
|
||||
end
|
||||
|
||||
q = q.attribute_matches(:is_locked, params[:is_locked])
|
||||
q = q.attribute_matches(:is_deleted, params[:is_deleted])
|
||||
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user