Sha256: 5375b75a3ed572d403fed3d91db9dab43b6096458b57f19f4350dabd14b40a49
Contents?: true
Size: 386 Bytes
Versions: 6
Compression:
Stored size: 386 Bytes
Contents
module Agilibox::ModelI18n extend ActiveSupport::Concern def t(*args) self.class.t(*args) end def ts self.class.ts end class_methods do def t(*args) if args.any? human_attribute_name(*args) else model_name.human end end def ts model_name.human(count: 2) end end # class_methods end # Agilibox::ModelI18n
Version data entries
6 entries across 6 versions & 1 rubygems