forked from e621ng/e621ng
[Artist] Change search field 'linked' from true/any to true/false/any (#923)
This commit is contained in:
parent
4af95e56cc
commit
7b7482b949
@ -483,6 +483,8 @@ class Artist < ApplicationRecord
|
|||||||
|
|
||||||
if params[:is_linked].to_s.truthy?
|
if params[:is_linked].to_s.truthy?
|
||||||
q = q.where("linked_user_id IS NOT NULL")
|
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
|
end
|
||||||
|
|
||||||
case params[:order]
|
case params[:order]
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
<%= f.input :url_matches, label: "URL", as: :string %>
|
<%= f.input :url_matches, label: "URL", as: :string %>
|
||||||
<%= f.user :creator %>
|
<%= f.user :creator %>
|
||||||
<%= f.input :has_tag, label: "Has tag?", collection: [["Yes", true], ["No", false]], include_blank: true %>
|
<%= 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"]] %>
|
<%= f.input :order, collection: [["Recently created", "created_at"], ["Last updated", "updated_at"], ["Name", "name"], ["Post count", "post_count"]] %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
Loading…
Reference in New Issue
Block a user