Module: CroppedPaperclip::Schema::TableDefinition

Defined in:
lib/cropped_paperclip/schema.rb

Instance Method Summary collapse

Instance Method Details

#uploadable_attachment(*attachment_names) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/cropped_paperclip/schema.rb', line 24

def uploadable_attachment(*attachment_names)
  attachment_names.each do |attachment_name|
    UPLOAD_COLUMNS.each_pair do |column_name, column_type|
      column("#{attachment_name}_#{column_name}", column_type)
    end
  end
end