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
In Rails 5 you can use ActiveRecord::Type::Boolean.new.cast(value) to cast it to a boolean.
ActiveRecord::Type::Boolean.new.cast(value)