Module: Attachinary::Extension::Base

Included in:
Attachinary::Extension
Defined in:
lib/attachinary/orm/base_extension.rb

Instance Method Summary collapse

Instance Method Details

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



7
8
9
# File 'lib/attachinary/orm/base_extension.rb', line 7

def has_attachment(scope, options={})
  attachinary options.merge(single: true, scope: scope)
end

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



11
12
13
# File 'lib/attachinary/orm/base_extension.rb', line 11

def has_attachments(scope, options={})
  attachinary options.merge(single: false, scope: scope)
end