Sha256: 5ba4cb37af31430ea7043a0d49ab9217e4b06b96ab0e5725550a752a45a5379f

Contents?: true

Size: 693 Bytes

Versions: 23

Compression:

Stored size: 693 Bytes

Contents

module S3Relay
  module UploadsHelper

    def s3_relay_field(parent, association, opts={})
      file_field     = file_field_tag(:file, opts.merge(class: "s3r-field"))
      progress_table = content_tag(:table, "", class: "s3r-upload-list")
      content        = [file_field, progress_table].join
      parent_type    = parent.class.to_s.underscore.downcase

      content_tag(:div, raw(content),
        {
          class: "s3r-container",
          data:  {
            parent_type: parent_type,
            parent_id:   parent.id.to_s,
            association: association.to_s,
            disposition: opts.fetch(:disposition, "inline")
          }
        }
      )
    end

  end
end

Version data entries

23 entries across 23 versions & 3 rubygems

Version Path
s3_relay-0.7.0 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.6.2 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.6.1 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.7 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.6 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.5 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.4 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.3 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.2 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.1 app/helpers/s3_relay/uploads_helper.rb
mongoid-direct-s3-upload-0.1.0 app/helpers/s3_relay/uploads_helper.rb
mongoid_direct_s3_upload-0.1.0 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.6.0 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.5.1 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.5.0 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.4.2 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.4.1 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.4.0 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.3.2 app/helpers/s3_relay/uploads_helper.rb
s3_relay-0.3.1 app/helpers/s3_relay/uploads_helper.rb