Sha256: 40106da9b2ed09936b37b5c37e69e7f4ee33628a97adc0dd49a93fafbf7cc150
Contents?: true
Size: 425 Bytes
Versions: 11
Compression:
Stored size: 425 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?") end out.html_safe end end
Version data entries
11 entries across 11 versions & 1 rubygems