Recommendations? I've tried wrapping the Rails method in a local method that includes the module, but I get a "can't call private method" error.
Cheers,
Walter
Bonus points: Make this db agnostic.
Will Bryant
unread,
Oct 14, 2007, 6:41:04 PM10/14/07
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WellR...@googlegroups.com
Hi Walter,
You can just "include ActionView::Helpers::NumberHelper" into pretty much any object, including the task context - and then call number_to_human_size directly. Check out the attached...
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to WellR...@googlegroups.com
Sweet. I had tried that sort of. I had wrapped the call in a local method definition which was throwing the "private method" error. By including the module and using it directly within the task, all is well.