lib/enum_help/i18n.rb in enum_help-0.0.14 vs lib/enum_help/i18n.rb in enum_help-0.0.15
- old
+ new
@@ -49,10 +49,10 @@
end
METHOD
end
def self.translate_enum_label(klass, attr_name, enum_label)
- ::I18n.t("enums.#{klass.to_s.underscore}.#{attr_name}.#{enum_label}", default: enum_label)
+ ::I18n.t("enums.#{klass.to_s.underscore.gsub('/', '.')}.#{attr_name}.#{enum_label}", default: enum_label.humanize)
end
end
end