Module: Attachs::ActiveRecord::ConnectionAdapters::TableDefinition

Defined in:
lib/attachs/active_record/connection_adapters.rb

Instance Method Summary collapse

Instance Method Details

#attachment(*attachment_names) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/attachs/active_record/connection_adapters.rb', line 30

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