Created
January 23, 2020 20:04
-
-
Save vitaly-pushkar/d668b255c7564acb6fc18f74a7de7218 to your computer and use it in GitHub Desktop.
From the blog post "Error Handling with Either Monads in Ruby"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveRecord::Base.establish_connection( adapter: 'sqlite3', database: ":memory:" ) | |
ActiveRecord::Schema.define(version: 1) { create_table(:users) { |t| t.string :name; t.string :email } } | |
class User < ActiveRecord::Base; end | |
User.create(name: 'Vitaly', email: '[email protected]') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment