3
4
5
6
7
8
9
10
11
12
13
14
15
|
# File 'lib/tessa/simple_form/asset_input.rb', line 3
def input(wrapper_options=nil)
merged_input_options = merge_wrapper_options(input_html_options, wrapper_options)
field = object.class.tessa_fields[attribute_name]
template.content_tag(
:div,
hidden_fields_for(object.public_send(attribute_name)),
"class" => "tessa-upload dropzone #{"multiple" if field.multiple?}",
"data-asset-field-prefix" => tessa_field_prefix,
"data-dropzone-options" => (options[:dropzone] || {}).to_json,
"data-tessa-params" => (options[:tessa_params] || {}).to_json,
)
end
|