Refactoring Gem Groups

This commit is contained in:
Sojan Jose
2019-10-17 03:48:48 +05:30
parent 3988777718
commit 701722983b
5 changed files with 97 additions and 34 deletions

View File

@@ -0,0 +1,10 @@
# frozen_string_literal: true
module Pubsubable
extend ActiveSupport::Concern
included do
#Used by the pusher/PubSub Service we use for real time communications
has_secure_token :pubsub_token
end
end

View File

@@ -1,7 +1,6 @@
class Contact < ApplicationRecord
include Pubsubable
#Used by the pusher/PubSub Service we use for real time communications
has_secure_token :pubsub_token
validates :account_id, presence: true
validates :inbox_id, presence: true

View File

@@ -2,6 +2,7 @@ class User < ApplicationRecord
# Include default devise modules.
include DeviseTokenAuth::Concerns::User
include Events::Types
include Pubsubable
devise :database_authenticatable,
:registerable,