We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d0128dc commit b08b2d2Copy full SHA for b08b2d2
app/models/search/tag_search_form.rb
@@ -45,10 +45,19 @@ def set_fandoms
45
@options[:fandom_ids] = Tag.where(name: names).pluck(:id)
46
end
47
48
+ def bool_value(str)
49
+ %w(true 1 T).include?(str.to_s)
50
+ end
51
+
52
def set_wrangling_status
- return unless @options[:canonical]
53
+ return if @options[:canonical].blank?
54
- @options[:wrangling_status] = "canonical"
55
+ # Match old behavior for canonical param
56
+ if bool_value(@options[:canonical])
57
+ @options[:wrangling_status] = "canonical"
58
+ else
59
+ @options[:wrangling_status] = "noncanonical"
60
61
62
63
def sort_columns
0 commit comments