Sha256: b039ca2c341c72338a7fcaa4cda5d0275a55e46a3c9f4b48dfdb0b67c7bbff40
Contents?: true
Size: 383 Bytes
Versions: 13
Compression:
Stored size: 383 Bytes
Contents
module Dorsale module ModelI18n def t(*args) self.class.t(*args) end def self.included(model) model.instance_eval do def t(*args) if args.any? human_attribute_name(*args) else model_name.human end end end end end end ActiveRecord::Base.send(:include, ::Dorsale::ModelI18n)
Version data entries
13 entries across 13 versions & 1 rubygems