Sha256: 51c4140cd371f00873db811636e1710f88ecb90a8de7629f630caf39128038fd
Contents?: true
Size: 594 Bytes
Versions: 16
Compression:
Stored size: 594 Bytes
Contents
module Plutonium module Core module Fields module Inputs class AttachmentInput < SimpleFormInput attr_reader :reflection def initialize(name, reflection:, **user_options) @reflection = reflection super(name, **user_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
16 entries across 16 versions & 1 rubygems