lib/rails_admin/config/fields/factories/carrierwave.rb in rails_admin-3.1.2 vs lib/rails_admin/config/fields/factories/carrierwave.rb in rails_admin-3.1.3
- old
+ new
@@ -5,10 +5,10 @@
require 'rails_admin/config/fields/types/file_upload'
RailsAdmin::Config::Fields.register_factory do |parent, properties, fields|
model = parent.abstract_model.model
if defined?(::CarrierWave) && model.is_a?(CarrierWave::Mount) && model.uploaders.include?(attachment_name = properties.name.to_s.chomp('_file_name').to_sym)
- columns = [model.uploader_options[attachment_name][:mount_on] || attachment_name, "#{attachment_name}_content_type".to_sym, "#{attachment_name}_file_size".to_sym]
+ columns = [model.uploader_options[attachment_name][:mount_on] || attachment_name, :"#{attachment_name}_content_type", :"#{attachment_name}_file_size"]
field = RailsAdmin::Config::Fields::Types.load(
%i[serialized json].include?(properties.type) ? :multiple_carrierwave : :carrierwave,
).new(parent, attachment_name, properties)
fields << field
children_fields = []