From 1fa37b20e1ee5f218e98b21da518927a2512f953 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 23 Mar 2023 15:47:06 -0300 Subject: [PATCH] fix: solo invitar una vez --- app/views/devise/mailer/invitation_instructions.html.haml | 2 +- app/views/devise/mailer/invitation_instructions.text.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/devise/mailer/invitation_instructions.html.haml b/app/views/devise/mailer/invitation_instructions.html.haml index bc9d9e4e..3cb9704e 100644 --- a/app/views/devise/mailer/invitation_instructions.html.haml +++ b/app/views/devise/mailer/invitation_instructions.html.haml @@ -8,7 +8,7 @@ %h1= site.title %p= site.description -- if @resource.created_by_invite? +- if @resource.created_by_invite? && !@resource.invitation_accepted? %p= link_to t('devise.mailer.invitation_instructions.accept'), accept_invitation_url(@resource, invitation_token: @token) diff --git a/app/views/devise/mailer/invitation_instructions.text.haml b/app/views/devise/mailer/invitation_instructions.text.haml index a1360bb0..2050c19c 100644 --- a/app/views/devise/mailer/invitation_instructions.text.haml +++ b/app/views/devise/mailer/invitation_instructions.text.haml @@ -9,7 +9,7 @@ \ = site.description \ -- if @resource.created_by_invite? +- if @resource.created_by_invite? && !@resource.invitation_accepted? = accept_invitation_url(@resource, invitation_token: @token) \ - if @resource.invitation_due_at