module Globalize::Automatic::TranslationExtension

Private Instance Methods

after_save() click to toggle source
# File lib/globalize/automatic.rb, line 177
def after_save
  if globalized_model
    changed_attr_names =
        globalized_model.translated_attribute_names & changes.keys.map(&:to_sym)

    execute_after_commit do
      globalized_model.run_automatic_translation(from_locale: locale,
                                                 attribute_names: changed_attr_names)
      true
    end
  end
  true
end