Sha256: e66ebc99e5601049791e2c72dde177e437321b87486773ab829dabf727bb66b0
Contents?: true
Size: 480 Bytes
Versions: 52
Compression:
Stored size: 480 Bytes
Contents
class DeletableAttachmentInput < SimpleForm::Inputs::FileInput def input(wrapper_options) merged_input_options = merge_wrapper_options(input_html_options, wrapper_options) out = '' out << @builder.file_field(attribute_name, merged_input_options) if object.send("#{attribute_name}?") out << @builder.input("delete_#{attribute_name}", as: :boolean, label: "Remove?", wrapper_html: { class: 'deletable_attachment_input' }) end out.html_safe end end
Version data entries
52 entries across 52 versions & 1 rubygems