Sha256: f9607282935bf49cc2be394e243517e85915264923eb7925c3b24b2f32eff20a

Contents?: true

Size: 456 Bytes

Versions: 1

Compression:

Stored size: 456 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, &blk)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
awesome_translations-0.0.22 lib/awesome_translations/controller_translate_functionality.rb