Create Remote Translations Caller
This module is used in a callback model and in charge of
- extracting resources associated from RemoteTranslation and preparing
its fields to be sent to the MicrosoftTranslateClient thought DelayedJobs
- receive the response from MicrosoftTranslateClient and update resource
with his translates
Co-authored-by: javierm <elretirao@gmail.com>
This commit is contained in:
@@ -9,6 +9,7 @@ class RemoteTranslation < ApplicationRecord
|
||||
after_create :enqueue_remote_translation
|
||||
|
||||
def enqueue_remote_translation
|
||||
RemoteTranslationsCaller.new(self).delay.call
|
||||
end
|
||||
|
||||
def self.remote_translation_enqueued?(remote_translation)
|
||||
|
||||
Reference in New Issue
Block a user