Class: ImageInput

Inherits:
Formtastic::Inputs::FileInput
  • Object
show all
Defined in:
app/inputs/image_input.rb

Instance Method Summary collapse

Instance Method Details

#image_html_optionsObject



2
3
4
# File 'app/inputs/image_input.rb', line 2

def image_html_options
  {class: 'image'}.merge(options.fetch(:image_html, {}))
end

#to_htmlObject



6
7
8
9
10
11
12
# File 'app/inputs/image_input.rb', line 6

def to_html
  input_wrapping do
    label_html <<
    image_html <<
    builder.file_field(method, input_html_options)
  end
end