Sha256: 4630654c48caa4223c1d279289a15eefb0775b6ff2dbaf0c6c872b2a070fb376
Contents?: true
Size: 469 Bytes
Versions: 6
Compression:
Stored size: 469 Bytes
Contents
module Cardboard class Field::File < Field dragonfly_accessor :value validates_size_of :value, :maximum => 20.megabytes #20000.kilobytes #TODO: move size to gem settings validate :is_required #for some reason this is different from image def value return nil unless value_uid if value_uid =~ /^app\/assets\/files/ Dragonfly.app.fetch_file(value_uid) else Dragonfly.app.fetch(value_uid) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems