3
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/tessa/simple_form/asset_input.rb', line 3
def input(wrapper_options=nil)
raise StandardError, "AssetInput with multiple: true not yet supported" if options[:multiple]
template.content_tag(
:div,
hidden_fields_for(attribute_name),
"class" => "tessa-upload dropzone #{"multiple" if options[:multiple]}",
"data-dropzone-options" => (options[:dropzone] || {}).to_json,
"data-input-name" => "#{object_name}[#{attribute_name}]",
"data-direct-upload-url" => Rails.application.routes.url_helpers.rails_direct_uploads_path,
)
end
|