Sha256: 216d6692aac9af6cdd3d5510550b065064143679c4f874a7cfd64ef664b4709a
Contents?: true
Size: 726 Bytes
Versions: 36
Compression:
Stored size: 726 Bytes
Contents
module ActiveScaffold module Bridges class Carrierwave module CarrierwaveBridge def initialize(model_id) super return unless model.respond_to?(:uploaders) && model.uploaders.present? update.multipart = true create.multipart = true model.uploaders.each_key do |field| configure_carrierwave_field(field.to_sym) end end private def configure_carrierwave_field(field) columns << field columns[field].form_ui ||= :carrierwave # :TODO thumbnail columns[field].params.add "#{field}_cache" columns[field].params.add "remove_#{field}" end end end end end
Version data entries
36 entries across 36 versions & 1 rubygems