remove unneeded condition from invite model
This commit is contained in:
parent
4fb9269642
commit
d3ee5752b8
|
@ -253,13 +253,13 @@ class Invite < ActiveRecord::Base
|
|||
|
||||
def self.resend_all_invites_from(user_id)
|
||||
Invite.where('invites.user_id IS NULL AND invites.email IS NOT NULL AND invited_by_id = ?', user_id).find_each do |invite|
|
||||
invite.resend_invite unless invite.blank?
|
||||
invite.resend_invite
|
||||
end
|
||||
end
|
||||
|
||||
def self.rescind_all_invites_from(user)
|
||||
Invite.where('invites.user_id IS NULL AND invites.email IS NOT NULL AND invited_by_id = ?', user.id).find_each do |invite|
|
||||
invite.trash!(user) unless invite.blank?
|
||||
invite.trash!(user)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue