Last active
April 3, 2018 15:12
-
-
Save kejadlen/67f28ed8f618bb7e60a1c22b2f048007 to your computer and use it in GitHub Desktop.
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
source "https://rubygems.org" | |
gem "activerecord" | |
gem "sqlite3" | |
group :development do | |
gem "pry" | |
end |
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
rubyonrails: | |
name: Ruby on Rails | |
url: http://www.rubyonrails.org | |
google: | |
name: Google | |
url: http://www.google.com |
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
require "active_record" | |
require "active_record/fixtures" | |
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:") | |
ActiveRecord::Schema.define(version: 1) do | |
create_table :sites do |t| | |
t.text :name | |
t.text :url | |
end | |
end | |
class Site < ActiveRecord::Base | |
end | |
ActiveRecord::FixtureSet.create_fixtures(__dir__, Dir["*.yml"].map {|file| File.basename(file, ".yml") }) | |
require "pry" | |
binding.pry |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment