From 4bd2cc1a4318cb44b7771cf79620fcb7068099ac Mon Sep 17 00:00:00 2001 From: Carlos Quinones Date: Fri, 6 Sep 2024 17:39:06 -0400 Subject: [PATCH] Correct type annotation ActiveRecordColumnTypeHelper's @constant.primary_key can be nil for models that don't have a primary key --- lib/tapioca/dsl/helpers/active_record_column_type_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb b/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb index 7dd8a5999..bee601986 100644 --- a/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb +++ b/lib/tapioca/dsl/helpers/active_record_column_type_helper.rb @@ -105,7 +105,7 @@ def id_type end end - sig { params(column_name: String).returns([String, String]) } + sig { params(column_name: T.nilable(String)).returns([String, String]) } def column_type_for(column_name) return ["T.untyped", "T.untyped"] if @column_type_option.untyped?