Class: SimpleFormAttachments::AttachmentInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
lib/simple_form_attachments/attachment_input.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration


7
8
9
# File 'lib/simple_form_attachments/attachment_input.rb', line 7

def configuration
  @configuration
end

Class Method Details

.configure {|@configuration| ... } ⇒ Object

Yields:


9
10
11
12
# File 'lib/simple_form_attachments/attachment_input.rb', line 9

def configure
  @configuration ||= Configuration.new
  yield @configuration
end

Instance Method Details

#input(wrapper_options) ⇒ Object


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/simple_form_attachments/attachment_input.rb', line 21

def input(wrapper_options)
  template. :div, merge_wrapper_options(input_html_options, wrapper_options) do
    template.concat attachment_blank_field
    template.concat attachment_file_field
    template.concat attachment_type_field
    template.concat attachment_multiple_field
    template.concat attachment_parent_class_field
    template.concat attachment_parent_name_field
    template.concat attachment_relation_key_field
    template.concat attachment_relation_name_field
    template.concat attachment_relation_class_field
    template.concat attachment_list
    template.concat handlebars_js_template
  end
end