Module: Dragonfly::Model::InstanceMethods

Defined in:
lib/dragonfly/model/instance_methods.rb

Instance Method Summary collapse

Instance Method Details

#dragonfly_attachmentsObject


5
6
7
8
9
10
# File 'lib/dragonfly/model/instance_methods.rb', line 5

def dragonfly_attachments
  @dragonfly_attachments ||= self.class.dragonfly_attachment_classes.inject({}) do |hash, klass|
    hash[klass.attribute] = klass.new(self)
    hash
  end
end