Do not show deleted users as members of groups (fixes #587)

This commit is contained in:
Patrick Gansterer 2018-12-18 15:48:27 +01:00
parent f8507655df
commit a4f5b8fb33
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@ class Group < ApplicationRecord
include MarkAsDeletedWithName
has_many :memberships, dependent: :destroy
has_many :users, :through => :memberships
has_many :users, -> { where(deleted_at: nil) }, through: :memberships
validates :name, :presence => true, :length => {:in => 1..25}