Find_by_sql returns Strings! How to I type cast?

When i run find_by_sql the extra fields not in the Model are returned
as Strings.

What is the correct way to convert all the extra fields to their correct
type? Is there a way to somehow define these extra fields in the Model
class to ensure they will always be returned correctly? Or is their a
better method.

I will be using find_by_sql a lot so a clean solution would be good.
(I am using Mysql)s

Thanks in advance
Chri

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs