Update app/models/user.rb

Co-authored-by: Colin Darie <colin@darie.eu>
This commit is contained in:
Paul Chavard 2023-04-04 15:02:20 +02:00 committed by GitHub
parent 0864666d0a
commit e2d5834dc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -95,7 +95,7 @@ class User < ApplicationRecord
end
def invite?(dossier)
invites.pluck(:dossier_id).include?(dossier.id)
invites.exists?(dossier:)
end
def owns_or_invite?(dossier)