Sha256: 05962219bf1d5e385dcf3a7e39a616a7355e3d9c18a725857ad96f171b836a14

Contents?: true

Size: 563 Bytes

Versions: 39

Compression:

Stored size: 563 Bytes

Contents

module Avo
  module Fields
    class FileField < BaseField
      attr_accessor :link_to_resource
      attr_accessor :is_avatar
      attr_accessor :is_image

      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
      end

      def path
        rails_blob_url value
      end
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
avo-1.17.1 lib/avo/fields/file_field.rb
avo-1.17.0 lib/avo/fields/file_field.rb
avo-1.16.4 lib/avo/fields/file_field.rb
avo-1.16.3 lib/avo/fields/file_field.rb
avo-1.16.2 lib/avo/fields/file_field.rb
avo-1.16.1 lib/avo/fields/file_field.rb
avo-1.16.0 lib/avo/fields/file_field.rb
avo-1.15.0 lib/avo/fields/file_field.rb
avo-1.15.0.pre.1 lib/avo/fields/file_field.rb
avo-1.14.0 lib/avo/fields/file_field.rb
avo-1.13.3 lib/avo/fields/file_field.rb
avo-1.13.2 lib/avo/fields/file_field.rb
avo-1.13.1 lib/avo/fields/file_field.rb
avo-1.13.0 lib/avo/fields/file_field.rb
avo-1.12.4 lib/avo/fields/file_field.rb
avo-1.12.3 lib/avo/fields/file_field.rb
avo-1.12.2 lib/avo/fields/file_field.rb
avo-1.12.1 lib/avo/fields/file_field.rb
avo-1.12.0 lib/avo/fields/file_field.rb
avo-1.11.6 lib/avo/fields/file_field.rb