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

Version Path
hackathon_manager-0.5.11 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.10 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.9 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.8 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.7 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.6 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.5 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.4 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.3 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.2 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.1 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.5.0 app/inputs/deletable_attachment_input.rb