Module: ActiveScaffold::Bridges::Dragonfly::Lib::DragonflyBridge
- Defined in:
- lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
18 19 20 |
# File 'lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb', line 18 def self.included(base) base.alias_method_chain :initialize, :dragonfly end |
Instance Method Details
#initialize_with_dragonfly(model_id) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/active_scaffold/bridges/dragonfly/lib/dragonfly_bridge.rb', line 6 def initialize_with_dragonfly(model_id) initialize_without_dragonfly(model_id) return unless self.model.respond_to?(:dragonfly_attachment_classes) && self.model..present? self.update.multipart = true self.create.multipart = true self.model..each do || configure_dragonfly_field(.attribute) end end |