Skip to content

Commit 8979d69

Browse files
committed
Match existing behavior for canonical 'T' and 'F'
1 parent d0128dc commit 8979d69

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/models/search/tag_search_form.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,15 @@ def set_fandoms
4545
@options[:fandom_ids] = Tag.where(name: names).pluck(:id)
4646
end
4747

48+
def bool_value(str)
49+
%w(true 1 T).include?(str.to_s)
50+
end
51+
4852
def set_wrangling_status
49-
return unless @options[:canonical]
53+
return if @options[:canonical].blank?
5054

51-
@options[:wrangling_status] = "canonical"
55+
# Match old behavior for canonical param
56+
@options[:wrangling_status] = bool_value(@options[:canonical]) ? "canonical" : "noncanonical"
5257
end
5358

5459
def sort_columns

0 commit comments

Comments
 (0)