translation_serializer.rb 192 B

123456789
  1. # frozen_string_literal: true
  2. class REST::TranslationSerializer < ActiveModel::Serializer
  3. attributes :content, :detected_source_language, :provider
  4. def content
  5. object.text
  6. end
  7. end