Sha256: 5802bf47760ac92f88475f6e4b69ee330da63cdcb3cc5546dba1ffc297b4b152

Contents?: true

Size: 621 Bytes

Versions: 9

Compression:

Stored size: 621 Bytes

Contents

module S3Multipart
  module ActionViewHelpers
    module FormHelper
      def multipart_uploader_form(options = {})
        uploader_digest = S3Multipart::Uploader.serialize(options[:uploader])
        html = file_field_tag options[:input_name], :accept => options[:types].join(','), :multiple => 'multiple', :data => {:uploader => uploader_digest}
        html << options[:html].html_safe
        html << button_tag(:class => options[:button_class]) do
          content_tag(:span, options[:button_text])
        end
      end
    end
  end
end

ActionView::Base.send :include, S3Multipart::ActionViewHelpers::FormHelper

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
s3_multipart-0.0.10.6 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.10.5 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.10.4 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.10.3 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.10.2 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.9 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.8 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.7 lib/s3_multipart/action_view_helpers/form_helper.rb
s3_multipart-0.0.6 lib/s3_multipart/action_view_helpers/form_helper.rb