Sha256: 0d1f37e56f0ce3f0ee2bd52975142ca8d80d39ed297549b5421658e4968feb49

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

require "active_record"

class User < ActiveRecord::Base
  has_one :profile
  has_many :projects
end

class Profile < ActiveRecord::Base
  belongs_to :user
end

class Project < ActiveRecord::Base
  belongs_to :user
end

Dir::mkdir("db") unless File.exists?("db")

ActiveRecord::Base.establish_connection \
  :adapter => "sqlite3",
  :database => "db/test.db",
  :pool => 5,
  :timeout => 5000

ActiveRecord::Migrator.migrate("./spec/db/migrate")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ar2gostruct-0.2.0 spec/support/models.rb