Module: FileSizeHelper
- Defined in:
- app/helpers/file_size_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.mb_size(bytes) ⇒ Object
2 3 4 |
# File 'app/helpers/file_size_helper.rb', line 2 def self.mb_size(bytes) [sprintf("%.3f", bytes.to_f/1.megabyte.to_f), I18n.t('file_size_helper.mb')].join(' ') end |
Instance Method Details
#mb_size(bytes) ⇒ Object
6 7 8 |
# File 'app/helpers/file_size_helper.rb', line 6 def mb_size(bytes) FileSizeHelper.mb_size(bytes) end |