Sha256: 30a41c6271809277e813880be083d13bcea1f3b75184d4ec2006c2eb3ca3b6ed

Contents?: true

Size: 399 Bytes

Versions: 15

Compression:

Stored size: 399 Bytes

Contents

module InstantUpload
  module Helpers

    module UploadHelper

      def instant_upload_for(record, field, options = {})
        partial ||= options[:multi].present? ? 'instant_upload/multi' : 'instant_upload/single'
        render partial: partial, locals: { record: record, field: field, options: { field: field, persisted: record.persisted?.to_s }.merge(options) }
      end

    end

  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
instant-upload-1.1.4 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.1.3 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.1.2 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.1.1 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.1.0 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.9 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.8 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.7 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.6 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.5 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.4 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.3 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.2 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.1 lib/instant_upload/helpers/upload_helper.rb
instant-upload-1.0.0 lib/instant_upload/helpers/upload_helper.rb