Sha256: dfdd58f77840788ee9247ed7746e5446796b1e86b26408605661848ae5b2245d

Contents?: true

Size: 424 Bytes

Versions: 4

Compression:

Stored size: 424 Bytes

Contents

class InvoiceWhence < ActiveRecord::Base
	belongs_to :invoice
	belongs_to :whence

    def self.migrate which = :up 
      ActiveRecord::Schema.define do
        if which == :up
          create_table :invoice_whences do |t|
            t.references :invoice
			t.references :whence
			t.datetime :created_at
          end
        elsif which == :down
          drop_table :invoice_whences
        end
      end
    end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
Pratt-1.6.8-x86-linux models/invoice_whence.rb
Pratt-1.6.8 models/invoice_whence.rb
Pratt-1.6.5 models/invoice_whence.rb
Pratt-1.6.4 models/invoice_whence.rb