Class: Document

Inherits:
Asset
  • Object
show all
Includes:
ActionView::Helpers::NumberHelper
Defined in:
app/models/document.rb

Instance Method Summary collapse

Methods included from TenantModel

included

Instance Method Details

#to_hashObject



6
7
8
9
10
11
# File 'app/models/document.rb', line 6

def to_hash
  hash = attributes
  hash[:url] = data.url
  hash[:filesize] = number_to_human_size(data_file_size)
  hash
end