From 6c48f2e789e663772f4cb3544afd380e64891019 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Sun, 29 Mar 2020 09:34:57 +0530 Subject: [PATCH] Bug: Update conversation urls in email (#649) Update the conversation URLs in email templates. --- .../conversation_assigned.html.erb | 7 ++++++- .../conversation_created.html.erb | 7 ++++++- config/routes.rb | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assigned.html.erb b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assigned.html.erb index 2cb565ddb..73963708e 100644 --- a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assigned.html.erb +++ b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assigned.html.erb @@ -2,4 +2,9 @@

Time to save the world. A new conversation has been assigned to you

-

Click <%= link_to 'here', app_conversation_url(id: @conversation.display_id) %> to get cracking.

+

+Click <%= + link_to 'here', + app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id) +%> to get cracking. +

diff --git a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_created.html.erb b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_created.html.erb index 091cce51f..75db9a961 100644 --- a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_created.html.erb +++ b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_created.html.erb @@ -2,4 +2,9 @@

Time to save the world. A new conversation has been created in <%= @conversation.inbox.name %>

-

Click <%= link_to 'here', app_conversation_url(id: @conversation.display_id) %> to get cracking.

+

+Click <%= + link_to 'here', + app_account_conversation_url(account_id: @conversation.account_id, id: @conversation.display_id) +%> to get cracking. +

diff --git a/config/routes.rb b/config/routes.rb index cf0d9a84c..978d394f4 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -136,7 +136,9 @@ Rails.application.routes.draw do # ---------------------------------------------------------------------- # Used in mailer templates resource :app, only: [:index] do - resources :conversations, only: [:show] + resources :accounts do + resources :conversations, only: [:show] + end end # ----------------------------------------------------------------------