Sha256: 445c0ce9edbfce2f25be7550371f367939a2b825a88646effda3ca75954a0413
Contents?: true
Size: 402 Bytes
Versions: 25
Compression:
Stored size: 402 Bytes
Contents
module Dorsale module ModelI18n def t(*args) self.class.human_attribute_name(*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
25 entries across 25 versions & 1 rubygems