Sha256: 180d44201b27dce63dddd9bb3b54ed5e04662dfc1a8bb29fa25c4c44f4c19919
Contents?: true
Size: 449 Bytes
Versions: 4
Compression:
Stored size: 449 Bytes
Contents
# Configures I18n in controllers. # origin: RM module ApplicationController::I18nTrait as_trait do prepend_before_filter :set_locale helper_method :translate_model_name private def translate_model_name(model) klass = model klass = klass.class if klass.is_a?(ActiveRecord::Base) klass.human_name end def set_locale I18n.locale = 'en' end end end
Version data entries
4 entries across 4 versions & 1 rubygems