Class: ButtonFileInput

Inherits:
SimpleForm::Inputs::FileInput
  • Object
show all
Defined in:
lib/simple_form_custom_inputs/simple_form/button_file_input.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#output_bufferObject

Returns the value of attribute output_buffer.



4
5
6
# File 'lib/simple_form_custom_inputs/simple_form/button_file_input.rb', line 4

def output_buffer
  @output_buffer
end

Instance Method Details

#input(wrapper_options = nil) ⇒ Object



6
7
8
9
10
11
# File 'lib/simple_form_custom_inputs/simple_form/button_file_input.rb', line 6

def input(wrapper_options = nil)
  input_html_options[:class] << 'hidden inputfile'
  merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)

  (@builder.file_field(attribute_name, merged_input_options) + button).html_safe
end