Skip to content

Instantly share code, notes, and snippets.

@iamvery
Last active August 29, 2015 14:06
Show Gist options
  • Save iamvery/9b9d7b8e2e68bb652690 to your computer and use it in GitHub Desktop.
Save iamvery/9b9d7b8e2e68bb652690 to your computer and use it in GitHub Desktop.
require 'active_record'
class Foo < ActiveRecord::Base
establish_connection adapter: 'sqlite3', database: ':memory:'
connection.create_table :foos do |t|
t.string :name, null: false
end
#has_many :bars
#validates :bars, presence: true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment