Sha256: af8836ecea7dc71a9fe8ff5f4801d4549c3d83c2784a34a3bf75faf44339b732

Contents?: true

Size: 443 Bytes

Versions: 6

Compression:

Stored size: 443 Bytes

Contents

require 'formtastic'

class UploaderInput
  include Formtastic::Inputs::Base
  
  def to_html
    input_wrapping do
      label_html <<
      builder.uploader_field(method, input_html_options)
    end
  end

  def input_html_options
    data = super
    data[:confirm_delete] = options[:confirm_delete]
    data[:confirm_message] = localized_string(method, method, :delete_confirmation) || I18n.t('uploader.confirm_delete')
    data
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails-uploader-0.2.2 lib/uploader/hooks/formtastic.rb
rails-uploader-0.2.1 lib/uploader/hooks/formtastic.rb
rails-uploader-0.2.0 lib/uploader/hooks/formtastic.rb
rails-uploader-0.1.4 lib/uploader/hooks/formtastic.rb
rails-uploader-0.1.3 lib/uploader/hooks/formtastic.rb
rails-uploader-0.1.2 lib/uploader/hooks/formtastic.rb