Class: Formtastic::Inputs::JfuUploadInput

Inherits:
FileInput
  • Object
show all
Defined in:
lib/formtastic/inputs/jfu_upload_input.rb

Instance Method Summary collapse

Instance Method Details

#input_html_optionsObject



6
7
8
# File 'lib/formtastic/inputs/jfu_upload_input.rb', line 6

def input_html_options
  super.merge( class: 'jfu_upload_input' )
end

#to_htmlObject



10
11
12
13
14
15
16
17
18
# File 'lib/formtastic/inputs/jfu_upload_input.rb', line 10

def to_html
  input_wrapping do
    label_html <<
      template.(:div, { class: 'jfu_upload_wrapper' }) do
        builder.file_field(method, input_html_options) <<
          template.(:ul)
      end
  end
end