Module: ActiveScaffold::Bridges::Dragonfly::DragonflyBridge

Defined in:
lib/active_scaffold/bridges/dragonfly/dragonfly_bridge.rb

Instance Method Summary collapse

Instance Method Details

#initialize(model_id) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/active_scaffold/bridges/dragonfly/dragonfly_bridge.rb', line 5

def initialize(model_id)
  super
  return unless model.respond_to?(:dragonfly_attachment_classes) && model.dragonfly_attachment_classes.present?

  update.multipart = true
  create.multipart = true

  model.dragonfly_attachment_classes.each do |attachment|
    configure_dragonfly_field(attachment.attribute)
  end
end