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
ActiveRecord provides a clean way of doing this.
def is_true?(string) ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES.include?(string) end
ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES has all of the obvious representations of True values as strings.
ActiveRecord::ConnectionAdapters::Column::TRUE_VALUES