Hi,
Is there a way to AutoParse a string to another type - e.g. if a Date
format
then date, else if integer than Integer etc, in Rails?
I’m wanting to pass search parameters via a URL, however since
everything in
the URL will be a string it would be good to automatically convert a
string
to the most likely variable type. In particular differentiating between
an
Integer and a Date.
Does this exist somewhere in Ruby already? Or do I have to write
myself?
Thanks in advance