class Lato::Invitation
def send_invite
def send_invite if accepted? errors.add(:base, :already_accepted) return false end if c_email_invite_semaphore errors.add(:base, :email_sending_limit) return false end delivery = Lato::InvitationMailer.invite_mail(id).deliver_now unless delivery errors.add(:base, :email_sending_error) return false end c_email_invite_semaphore(true) true end