Created
October 5, 2024 08:39
-
-
Save kyanagi/0a34ae69b55909a95a273e068ef6b16f to your computer and use it in GitHub Desktop.
This file contains hidden or 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 "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