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.14.1 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.14.0 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.12 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.11 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.10 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.9 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.8 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.7 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.6 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.5 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.4 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.3 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.2 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.1 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.13.0 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.12.2 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.12.1 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.12.0 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.11.2 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.11.1 app/inputs/deletable_attachment_input.rb