How to get human readable size in controller

hi,

     i know i can use human_size helper in views, but what if I need 

to
emit human readable size in the controller e.g. in an error message?


Ishaq
http://blogs.kahaf.com/ishaq

  • Programming can be fun, so can be cryptography, however they should
    not be
    combined …

find the relevant code from human_size, copy it, and put it someplace
that’s accessible to your models

Here’s a good suggestion:

-Danimal