Skip to content

Instantly share code, notes, and snippets.

@kyanagi
Created October 5, 2024 08:39
Show Gist options
  • Save kyanagi/0a34ae69b55909a95a273e068ef6b16f to your computer and use it in GitHub Desktop.
Save kyanagi/0a34ae69b55909a95a273e068ef6b16f 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", github: "rails/rails", branch: "main"
gem "sqlite3"
gem "rbs_rails"
gem "active_type"
end
require "active_record"
ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:")
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Schema.define do
create_table :items, force: true do |t|
end
end
class Item < ActiveRecord::Base
end
class X < ActiveType::Object
end
p RbsRails::ActiveRecord.generatable?(Item)
p RbsRails::ActiveRecord.generatable?(X)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment