I have a Rails application and I\'m using jQuery to query my search view in the background. There are fields q (search term), start_date, end
q
start_date
end
Perhaps str.to_s.downcase == 'true' for completeness. Then nothing can crash even if str is nil or 0.
str.to_s.downcase == 'true'
str