Sha256: c248294197320abac6a999f37a58401bd88b8c5843a7b6064db2355d9f101be6

Contents?: true

Size: 290 Bytes

Versions: 16

Compression:

Stored size: 290 Bytes

Contents

module TranslationsHelper
  def with_translations(locale, translations)
    original_backend = I18n.backend

    I18n.backend = I18n::Backend::KeyValue.new({}, true)
    I18n.backend.store_translations(locale, translations)

    yield
  ensure
    I18n.backend = original_backend
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 spec/support/translations.rb
renalware-core-2.0.0.pre.rc10 spec/support/translations.rb
renalware-core-2.0.0.pre.rc9 spec/support/translations.rb
renalware-core-2.0.0.pre.rc8 spec/support/translations.rb
renalware-core-2.0.0.pre.rc7 spec/support/translations.rb
renalware-core-2.0.0.pre.rc6 spec/support/translations.rb
renalware-core-2.0.0.pre.rc5 spec/support/translations.rb
renalware-core-2.0.0.pre.rc4 spec/support/translations.rb
renalware-core-2.0.0.pre.rc3 spec/support/translations.rb
renalware-core-2.0.0.pre.rc1 spec/support/translations.rb
renalware-core-2.0.0.pre.beta12 spec/support/translations.rb
renalware-core-2.0.0.pre.beta11 spec/support/translations.rb
renalware-core-2.0.0.pre.beta10 spec/support/translations.rb
renalware-core-2.0.0.pre.beta9 spec/support/translations.rb
renalware-core-2.0.0.pre.beta8 spec/support/translations.rb
renalware-core-2.0.0.pre.beta7 spec/support/translations.rb