Sha256: 5adb1560f6341dc710dbeab8d25a3f674c8173c19acf61f995639ab68ece697c
Contents?: true
Size: 478 Bytes
Versions: 38
Compression:
Stored size: 478 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 = {}, &blk) AwesomeTranslations::GlobalTranslator.translate(key, translation_args: [args], caller_number: 1, action_in_key: false, &blk) end end end
Version data entries
38 entries across 38 versions & 1 rubygems