Module: Extensions::Attachable::ActionView::Helpers::FormBuilder

Defined in:
lib/extensions/attachable/action_view/helpers/form_builder.rb

Instance Method Summary collapse

Instance Method Details

#attachments(allow_delete: true) ⇒ Object Also known as: attachment

Method from ActsAsAttachable framework. Hepler to support f.attachments in form


7
8
9
10
11
# File 'lib/extensions/attachable/action_view/helpers/form_builder.rb', line 7

def attachments(allow_delete: true)
  multiple = !object.respond_to?(:attachment)
  @template.render 'layouts/attachment_uploader',
                   f: self, multiple: multiple, allow_delete: allow_delete
end