Sha256: c58ead7bdf1ac3a81b91c71212aaf46f9c36ed0c1425a690e935cb1a7802a0f8
Contents?: true
Size: 546 Bytes
Versions: 24
Compression:
Stored size: 546 Bytes
Contents
# frozen_string_literal: true require 'i18n/backend/active_record' unless defined?(Translation) Translation = I18n::Backend::ActiveRecord::Translation Translation.include Spotlight::CustomTranslationExtension # Work-around for https://github.com/svenfuchs/i18n-active_record/pull/133 if Translation.respond_to?(:to_hash) class << Translation alias to_h to_hash remove_method :to_hash end I18n::Backend::ActiveRecord.define_method(:init_translations) do @translations = Translation.to_h end end end
Version data entries
24 entries across 24 versions & 1 rubygems