Sha256: 66e5e018d07440a3a3237d901096416357e7c85efe31493d75dd3484ca22451e
Contents?: true
Size: 487 Bytes
Versions: 3
Compression:
Stored size: 487 Bytes
Contents
module I18n module Screwdriver def self.included(klass) klass.send :include, InstanceMethods end module InstanceMethods def _(translation) # the . is a special character in rails i18n - we have to strip it translation_without_dot = translation.gsub(/\./, '').strip t("#{translation_without_dot}") end end end end ActionView::Base.send :include, I18n::Screwdriver ActionController::Base.send :include, I18n::Screwdriver
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
i18n_screwdriver-0.3.0 | lib/i18n_screwdriver.rb |
i18n_screwdriver-0.2.1 | lib/i18n_screwdriver.rb |
i18n_screwdriver-0.2.0 | lib/i18n_screwdriver.rb |