Sha256: 585c64052f695f286912744007a5fd4f4f51db64f19957a5188e7011544be462

Contents?: true

Size: 445 Bytes

Versions: 9

Compression:

Stored size: 445 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

9 entries across 9 versions & 2 rubygems

Version Path
rails-uploader-0.2.7 lib/uploader/hooks/formtastic.rb
rails-uploader-0.2.6 lib/uploader/hooks/formtastic.rb
glebtv-rails-uploader-0.6.1 lib/uploader/hooks/formtastic.rb
glebtv-rails-uploader-0.6.0 lib/uploader/hooks/formtastic.rb
rails-uploader-0.2.5 lib/uploader/hooks/formtastic.rb
glebtv-rails-uploader-0.5.1 lib/uploader/hooks/formtastic.rb
glebtv-rails-uploader-0.5.0 lib/uploader/hooks/formtastic.rb
rails-uploader-0.2.4 lib/uploader/hooks/formtastic.rb
rails-uploader-0.2.3 lib/uploader/hooks/formtastic.rb