Class: Interview::NestedFormAddImages

Inherits:
Control
  • Object
show all
Defined in:
lib/interview/controls/nested_form_add_images.rb

Instance Attribute Summary

Attributes inherited from Control

#parent

Instance Method Summary collapse

Methods inherited from Control

#ancestors, #build_child, #build_with_params, #find_attribute, #find_attribute!, #initialize, #set_attributes, #set_defaults

Constructor Details

This class inherits a constructor from Interview::Control

Instance Method Details

#build(b) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/interview/controls/nested_form_add_images.rb', line 4

def build(b)
  b.section html_class: "clearfix" do
    b.section style: 'span', html_class: "btn btn-default fileinput-button" do
      b.text text: "Bilder hinzufügen", style: 'span' # todo
      b << h.file_field_tag("upload_buffer[attachment]", class: 'nested_form_add_images',
        multiple: true, data: {url: "/upload_buffers.json", type: 'POST'})
    end
  end
end