From 7ca3951403563080e79b179b9535d0b91405d04e Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Wed, 1 Nov 2023 15:25:23 +0000 Subject: [PATCH] RBS: Decleare Profile#profile_badges manually As a preparation of giving types to controllers, this adds types for `Profile#profile_badges` manually because current rbs_rails does not support HABTM association. It should be removed if rbs_rails will support it in the future. refs: https://github.com/pocke/rbs_rails/pull/272 --- sig/handwritten/app/models/profile.rbs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sig/handwritten/app/models/profile.rbs b/sig/handwritten/app/models/profile.rbs index 92f8a832..15ccf62a 100644 --- a/sig/handwritten/app/models/profile.rbs +++ b/sig/handwritten/app/models/profile.rbs @@ -1,4 +1,9 @@ class Profile < ::ApplicationRecord + # NOTE: This method has been declared manually because current rbs_rails does not support HABTM. + # It should be removed if rbs_rails will support it. + # refs: https://github.com/pocke/rbs_rails/pull/272 + def profile_badges: () -> ProfileBadge::ActiveRecord_Associations_CollectionProxy + def ensure_image_from_github: () -> void private def fetch_profile_image_from_github: () -> untyped