Sha256: 36b8969ebd57ee06124d4f876a49e0cd86eb5f6d15cdda0e95ce8d643772608f
Contents?: true
Size: 1002 Bytes
Versions: 78
Compression:
Stored size: 1002 Bytes
Contents
module Avo module Fields class FileField < BaseField attr_accessor :link_to_resource attr_accessor :is_avatar attr_accessor :is_image attr_accessor :is_audio attr_accessor :direct_upload attr_accessor :accept attr_reader :display_filename def initialize(id, **args, &block) super(id, **args, &block) @link_to_resource = args[:link_to_resource].present? ? args[:link_to_resource] : false @is_avatar = args[:is_avatar].present? ? args[:is_avatar] : false @is_image = args[:is_image].present? ? args[:is_image] : @is_avatar @is_audio = args[:is_audio].present? ? args[:is_audio] : false @direct_upload = args[:direct_upload].present? ? args[:direct_upload] : false @accept = args[:accept].present? ? args[:accept] : nil @display_filename = args[:display_filename].nil? ? true : args[:display_filename] end def path rails_blob_url value end end end end
Version data entries
78 entries across 78 versions & 1 rubygems