search for: display_curr

Displaying 2 results from an estimated 2 matches for "display_curr".

Did you mean: display_cart
2006 Jan 27
3
Formatting Data in rhtml
...t is called "modifiers" to format data. {$price|currency_format} # displays in currency format {$description|truncate:"100"} # Truncates the description after 100 characters It seems like the template (rhtml) would be the ideal place to play with the display format. I saw a display_currency function in one of the other posts, and I tried including it in my application controller. It runs fine if you call it from within the controller, but it won''t let me call it from the rhtml file. in application controller: (or any controller) def display_currency(number) unless...
2006 Jan 17
9
Formatting a float with a set number of decimals
Another newbie question: How do i convert a float to a string, rounded to a certain number of decimals? Thanks -- Posted via http://www.ruby-forum.com/.