Sha256: 95a720e3e26d0aff89c16cc2719c25043a22f9e5f7234e65d68c169f3b6ec6dc
Contents?: true
Size: 291 Bytes
Versions: 3
Compression:
Stored size: 291 Bytes
Contents
# frozen_string_literal: true require "action_view" module Instant18n module Helper def it(key, **opts) lang = current_user&.preferred_language lang ||= I18n.default_language I18n.it(key, lang, **opts) end end end ActionView::Base.include Instant18n::Helper
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
instant18n-0.4.0 | lib/instant18n/helper.rb |
instant18n-0.3.0 | lib/instant18n/helper.rb |
instant18n-0.2.0 | lib/instant18n/helper.rb |