Sha256: 160bea839eafbf7d8bb79331db097f4d8d50f71ddb929c10de119aaecbe8dd35
Contents?: true
Size: 584 Bytes
Versions: 14
Compression:
Stored size: 584 Bytes
Contents
module Plutonium module Core module Fields module Inputs class AttachmentInput < SimpleFormInput attr_reader :reflection def initialize(name, reflection:, **options) @reflection = reflection super(name, **options) end private def input_options options = {attachment: true} # enable the attachment component options[:input_html] = {multiple: true} if reflection.macro == :has_many_attached options end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems