[Artist] Change search field 'linked' from true/any to true/false/any (#923)

This commit is contained in:
Catting 2025-02-19 09:24:15 -06:00 committed by GitHub
parent 4af95e56cc
commit 7b7482b949
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -483,6 +483,8 @@ class Artist < ApplicationRecord
if params[:is_linked].to_s.truthy?
q = q.where("linked_user_id IS NOT NULL")
elsif params[:is_linked].to_s.falsy?
q = q.where("linked_user_id IS NULL")
end
case params[:order]

View File

@ -3,6 +3,6 @@
<%= f.input :url_matches, label: "URL", as: :string %>
<%= f.user :creator %>
<%= f.input :has_tag, label: "Has tag?", collection: [["Yes", true], ["No", false]], include_blank: true %>
<%= f.input :is_linked, label: "Linked Only", as: :boolean %>
<%= f.input :is_linked, label: "Linked?", collection: [["Yes", true], ["No", false]], include_blank: true %>
<%= f.input :order, collection: [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]] %>
<% end %>