Class: SimpleFormExtension::Inputs::ImageInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Includes:
FileConcern, Translations
Defined in:
lib/simple_form_extension/inputs/image_input.rb

Instance Method Summary collapse

Methods included from FileConcern

#activestorage_attachment_attached?, #existing_file_name, #existing_file_tag, #file_exists?, #paperclip_attachment_attached?, #remove_attachment_method, #remove_file_button

Methods included from Translations

#_translate

Instance Method Details

#input(wrapper_options = nil) ⇒ Object



9
10
11
12
13
14
# File 'lib/simple_form_extension/inputs/image_input.rb', line 9

def input(wrapper_options = nil)
  input_html_options[:class] << "image-upload"
  input_html_options[:accept] ||= SimpleFormExtension.default_image_input_accept

  input_markup
end