group_removed_users associations
This commit is contained in:
parent
520c125e21
commit
17a6756bcb
@ -28,6 +28,9 @@ class Group < ApplicationRecord
|
||||
has_many :group_accounts, inverse_of: :group, dependent: :destroy
|
||||
has_many :accounts, through: :group_accounts
|
||||
|
||||
has_many :group_removed_accounts, inverse_of: :group, dependent: :destroy
|
||||
has_many :removed_accounts, source: :account, through: :group_removed_accounts
|
||||
|
||||
validates :title, presence: true
|
||||
validates :description, presence: true
|
||||
|
||||
|
@ -10,4 +10,6 @@
|
||||
#
|
||||
|
||||
class GroupRemovedAccount < ApplicationRecord
|
||||
belongs_to :group
|
||||
belongs_to :account
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user