From fa0904386f51182cb96d8131aea4c19827125d4f Mon Sep 17 00:00:00 2001 From: Pranav Raj Sreepuram Date: Mon, 19 Aug 2019 13:51:20 +0530 Subject: [PATCH] Disable host check, fix router url --- .../src/components/widgets/conversation/ConversationCard.vue | 2 +- app/models/conversation.rb | 2 +- config/environments/development.rb | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/javascript/src/components/widgets/conversation/ConversationCard.vue b/app/javascript/src/components/widgets/conversation/ConversationCard.vue index 9c7460afa..c2c57ed50 100644 --- a/app/javascript/src/components/widgets/conversation/ConversationCard.vue +++ b/app/javascript/src/components/widgets/conversation/ConversationCard.vue @@ -64,7 +64,7 @@ export default { methods: { cardClick(chat) { router.push({ - path: `/conversations/${chat.id}`, + path: `/u/conversations/${chat.id}`, }); }, extractMessageText(chatItem) { diff --git a/app/models/conversation.rb b/app/models/conversation.rb index 8256afaaa..47b00cc2f 100644 --- a/app/models/conversation.rb +++ b/app/models/conversation.rb @@ -13,7 +13,7 @@ class Conversation < ApplicationRecord belongs_to :account belongs_to :inbox belongs_to :assignee, class_name: 'User', optional: true - belongs_to :sender, class_name: 'Contact' #, primary_key: :source_id + belongs_to :sender, class_name: 'Contact', primary_key: :source_id has_many :messages, dependent: :destroy, autosave: true diff --git a/config/environments/development.rb b/config/environments/development.rb index bdc16ce60..cd92ee3c2 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -63,4 +63,7 @@ Rails.application.configure do # Use an evented file watcher to asynchronously detect changes in source code, # routes, locales, etc. This feature depends on the listen gem. config.file_watcher = ActiveSupport::EventedFileUpdateChecker + + # Disable host check during development + config.hosts = nil end