Skip to content

Commit

Permalink
feat: #has_member? on Account
Browse files Browse the repository at this point in the history
  • Loading branch information
kjellberg committed Apr 12, 2024
1 parent 7fbb2c3 commit f5e5937
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gems/kiqr/app/models/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ class Account < ApplicationRecord
has_many :account_users, dependent: :destroy
has_many :account_invitations, dependent: :destroy
has_many :users, through: :account_users

def has_member?(user)
users.include? user
end
end

0 comments on commit f5e5937

Please sign in to comment.