Skip to content

Instantly share code, notes, and snippets.

@ykpythemind
Last active June 29, 2020 03:42
Show Gist options
  • Save ykpythemind/59ddfeed7b67ead28603a5dfe0448a5f to your computer and use it in GitHub Desktop.
Save ykpythemind/59ddfeed7b67ead28603a5dfe0448a5f to your computer and use it in GitHub Desktop.
require "bundler/inline"
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "rails", '~> 5.2'
gem 'pry-rails'
gem "sqlite3"
end
require "active_record"
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Schema.define do
create_table :topics, force: true do |t|
t.string :title
end
end
ActiveRecord::Base.logger = Logger.new(STDOUT)
class Topic < ActiveRecord::Base
end
binding.pry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment