This gem adds Mobility plugin, which can be turned on for Rails model, and will check types of values passed to setters.
George Gorbanev
MIT