Sha256: 7af9c12edacacb6647f03d48a643b3d1d69a4dc20f1d9488913c490c0ff90a6e
Contents?: true
Size: 504 Bytes
Versions: 6
Compression:
Stored size: 504 Bytes
Contents
# Include this module to get access to the t-method. module AwesomeTranslations::ControllerTranslateFunctionality # Implements the method on both class- and instance-level. def self.included(base) base.__send__(:include, Methods) base.extend Methods end module Methods def controller_t(key, *args, **opts, &blk) AwesomeTranslations::GlobalTranslator.translate(key, action_in_key: false, caller_number: 1, translation_args: args, translation_opts: opts, &blk) end end end
Version data entries
6 entries across 6 versions & 1 rubygems