From a387761a86062e7ddf8f3091f1852caf92a5a50c Mon Sep 17 00:00:00 2001 From: Paul Bob Date: Fri, 6 Sep 2024 18:17:02 +0300 Subject: [PATCH] fix user <-> team association --- spec/dummy/app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/dummy/app/models/user.rb b/spec/dummy/app/models/user.rb index b03b6f88c4..60cdf6a3d9 100644 --- a/spec/dummy/app/models/user.rb +++ b/spec/dummy/app/models/user.rb @@ -37,7 +37,7 @@ class User < ApplicationRecord has_many :comments has_many :team_memberships has_and_belongs_to_many :projects, inverse_of: :users - has_and_belongs_to_many :teams, join_table: :team_memberships, inverse_of: :admin + has_many :teams, through: :team_memberships, inverse_of: :admin has_one_attached :cv