Sha256: 2b2d4a1b1ea5422b4a715ce288c57d9717102609ccbe13873754f14dbd419152

Contents?: true

Size: 400 Bytes

Versions: 1

Compression:

Stored size: 400 Bytes

Contents

module SimpleAttachments::MigrationHelpers

  # Create attachment model columns

  def attachment
    column(:filename, :string, :null => false)
    column(:mimetype, :string, :null => false)
    column(:filesize, :integer, :null => false)
    column(:filepath, :string, :null => false)
  end

end

ActiveRecord::ConnectionAdapters::TableDefinition.send :include, SimpleAttachments::MigrationHelpers

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_attachments-0.1.1 lib/simple_attachments/migration_helpers.rb