Sha256: afbf29d09ee7151b7ff0bdc7fcb42960457926a050b0605a7bb1cace0dd0615e
Contents?: true
Size: 479 Bytes
Versions: 35
Compression:
Stored size: 479 Bytes
Contents
module Godmin module Helpers module Translations def translate_scoped(translate, scope: nil, default: nil, **options) if @resource_class scope ||= @resource_class.to_s.underscore end defaults = [ ["godmin", scope, translate].compact.join(".").to_sym, ["godmin", translate].compact.join(".").to_sym, default ] t(defaults.shift, default: defaults, **options) end end end end
Version data entries
35 entries across 35 versions & 1 rubygems