Module: AttachmentSan::Has

Defined in:
lib/attachment_san/has.rb

Constant Summary collapse

MODEL_OPTIONS =
[:base_path, :public_base_path, :extension, :filename_scheme]
VARIANT_OPTIONS =
[:name, :process, :class, :variants, :filename_scheme]

Instance Method Summary collapse

Instance Method Details

#has_attachment(name, options = {}) ⇒ Object



6
7
8
# File 'lib/attachment_san/has.rb', line 6

def has_attachment(name, options = {})
  define_attachment_association :has_one, name, options
end

#has_attachments(name, options = {}) ⇒ Object



10
11
12
# File 'lib/attachment_san/has.rb', line 10

def has_attachments(name, options = {})
  define_attachment_association :has_many, name, options
end