Class: RailsAdmin::Config::Fields::Types::MultipleFileUpload
- Defined in:
- lib/rails_admin/config/fields/types/multiple_file_upload.rb
Direct Known Subclasses
Defined Under Namespace
Classes: AbstractAttachment
Constant Summary
Constants inherited from Base
Base::NAMED_INSTANCE_VARIABLES
Instance Attribute Summary
Attributes inherited from Base
#abstract_model, #defined, #name, #order, #parent, #properties, #root, #section
Instance Method Summary collapse
- #attachment(&block) ⇒ Object
- #attachments ⇒ Object
-
#initialize(*args) ⇒ MultipleFileUpload
constructor
A new instance of MultipleFileUpload.
-
#virtual? ⇒ Boolean
virtual class.
Methods inherited from Base
#association?, #eager_load_values, #editable?, #errors, #filter_options, #form_default_value, #form_value, #generic_field_help, #generic_help, #inverse_of, #method_name, #optional, #optional=, #optional?, #parse_input, #parse_value, #sort_column, #type, #type_css_class, #value
Methods included from Inspectable
Methods included from Groupable
Methods included from Hideable
#hidden?, #hide, included, #show
Methods included from Configurable
#has_option?, #register_deprecated_instance_option, #register_instance_option
Methods included from Proxyable
Constructor Details
#initialize(*args) ⇒ MultipleFileUpload
Returns a new instance of MultipleFileUpload.
59 60 61 62 |
# File 'lib/rails_admin/config/fields/types/multiple_file_upload.rb', line 59 def initialize(*args) super @attachment_configurations = [] end |
Instance Method Details
#attachment(&block) ⇒ Object
106 107 108 |
# File 'lib/rails_admin/config/fields/types/multiple_file_upload.rb', line 106 def (&block) @attachment_configurations << block end |
#attachments ⇒ Object
110 111 112 113 114 115 116 117 118 |
# File 'lib/rails_admin/config/fields/types/multiple_file_upload.rb', line 110 def Array(value).map do |attached| = .new(attached) @attachment_configurations.each do |config| .instance_eval(&config) end .with(bindings) end end |
#virtual? ⇒ Boolean
virtual class
121 122 123 |
# File 'lib/rails_admin/config/fields/types/multiple_file_upload.rb', line 121 def virtual? true end |