Montgomery Kosma wrote:
> with Tom's recent patch, at least, Hobo deals with BigDecimal quite
> well, making currency a snap.
> 
> That said, I agree, would love to see this extension.  In my case,
> developing a business process management tool, I have numerous stats
> and figures that I want the user to be able to flag as "estimated."
> As of now, those are separate boolean fields in the model associated
> with various bigdecimal or integer values.  Would love to be able to
> define a superclass (EstimatedBigDecimal) that captures all the
> functionality that goes with it (computation as well as the database
> and GUI elements).
> 


What I've done is just define a separate table.   IE, 
EstimatedBigDecimal is stored in the estimated_big_decimals table, and 
classes that use it have `belongs_to :price, :class => 
"EstimatedBigDecimal"`.

It seems wrong, but it works smoothly and allows me to define a custom 
view, custom input, et cetera for it.

Now granted, my classes weren't quite as simple as EstimatedBigDecimal, 
but simple enough that a separate table certainly seemed questionable!

cheers,
Bryan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to