lib/xdrgen/generators/javascript.rb in xdrgen-0.1.0 vs lib/xdrgen/generators/javascript.rb in xdrgen-0.1.1
- old
+ new
@@ -176,10 +176,10 @@
# Without downcasing, the following appears as singular, but it's plural:
#
# "BEGIN_SPONSORING_FUTURE_RESERVEs" == "BEGIN_SPONSORING_FUTURE_RESERVES"
# => false
#
- plural = named.name.downcase.pluralize == named.name.downcase
+ plural = named.name.underscore.downcase.pluralize == named.name.underscore.downcase
base = named.name.underscore.classify
result = plural ? base.pluralize : base
"#{parent}#{result}"
end