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

Version Path
hackathon_manager-0.4.4 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.4.3 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.4.2 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.4.1 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.4.0 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.3.3 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.3.2 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.3.1 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.3.0 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.2.0 app/inputs/deletable_attachment_input.rb
hackathon_manager-0.1.0 app/inputs/deletable_attachment_input.rb