Class: Workarea::Content::Fields::Asset

Inherits:
Workarea::Content::Field show all
Defined in:
app/models/workarea/content/fields/asset.rb

Instance Attribute Summary

Attributes inherited from Workarea::Content::Field

#name, #options

Instance Method Summary collapse

Methods inherited from Workarea::Content::Field

#default, #initialize, #note, #partial, #required?, #slug, #tooltip, #type

Constructor Details

This class inherits a constructor from Workarea::Content::Field

Instance Method Details

#file_typesObject



5
6
7
# File 'app/models/workarea/content/fields/asset.rb', line 5

def file_types
  Array(options[:file_types]).presence || []
end

#typecast(value) ⇒ Object



9
10
11
# File 'app/models/workarea/content/fields/asset.rb', line 9

def typecast(value)
  value.to_s
end