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
You can use wannabe_bool gem. https://github.com/prodis/wannabe_bool
This gem implements a #to_b method for String, Integer, Symbol and NilClass classes.
#to_b
params[:internal].to_b