I have a class called Duration that represents a unit of time. It has
of time-related methods and an attribute that represents the duration in
I want to store it in my db. I had a column type of NUMERIC, so if i
it, rails trys to coerce it to a float automagically and fails.
I need to display it and store it as a number but treat it in the middle
layer as a Duration so I can use all it’s wonderful functionality.
the right way to do this?