Module: ActiveStorageDragAndDrop::FormBuilder
- Defined in:
- lib/active_storage_drag_and_drop/form_builder.rb
Overview
Custom FormBuilder module. All code in this module is executed within the context of ActionView::Helpers::FormBuilder when ActionView is first loaded via the Engine
Instance Method Summary collapse
-
#drag_and_drop_file_field(method, content_or_options = nil, options = {}, &block) ⇒ String
Returns a file upload input tag wrapped in markup that allows dragging and dropping of files onto the element.
Instance Method Details
#drag_and_drop_file_field(method, content_or_options = nil, options = {}, &block) ⇒ String
Returns a file upload input tag wrapped in markup that allows dragging and dropping of files onto the element.
44 45 46 47 48 49 50 51 |
# File 'lib/active_storage_drag_and_drop/form_builder.rb', line 44 def drag_and_drop_file_field(method, = nil, = {}, &block) if block_given? = if .is_a? Hash drag_and_drop_file_field_string(method, capture(&block), ) else drag_and_drop_file_field_string(method, , ) end end |