Sha256: 537f352ae3d1b0429566c2095d734e515c7373ee66c1f9514923b913ca80aae3
Contents?: true
Size: 769 Bytes
Versions: 1
Compression:
Stored size: 769 Bytes
Contents
require 'active_record' require 'database_cleaner' DatabaseCleaner.strategy = :truncation ActiveRecord::Base.establish_connection adapter: 'sqlite3', database: ':memory:' ActiveRecord::Migration.verbose = false ActiveRecord::Migration.create_table :users do |t| t.timestamps end ActiveRecord::Migration.create_table :widgets do |t| t.references :user t.references :creator t.timestamps end ActiveRecord::Migration.create_table :other_classes do |t| t.references :user t.timestamps end ActiveRecord::Migration.create_table :users_widgets do |t| t.references :user t.references :widget end class User < ActiveRecord::Base; end class Widget < ActiveRecord::Base belongs_to :user end class OtherClass < ActiveRecord::Base belongs_to :user end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
reflections-1.2.0 | spec/support/active_record.rb |