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 could add to the String class to have the method of to_boolean. Then you could do 'true'.to_boolean or '1'.to_boolean
class String def to_boolean self == 'true' || self == '1' end end