[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Caching eval() for reuse to gain performance ?

Neville Burnell

6/28/2005 12:20:00 AM

>> You might just need to rethink your approach a little.

Well, things are working ok at the moment, although I'm happy to rethink
down the track. The purpose is to define the formatting and style
elements of the active record column for presentation in html.

Some data types, like date and money, require a little scriptlet for the
cell text like:

"$%.2f" % row["money"]
row["date"].strftime("%d/%m/%Y")

Now, at sometime in the future I might enumerate the supported formats
so that the designer passes a 'format type', but its early days and I
don't want to optimise it yet.

Nev