Undasherize the namespace when no event exists

This would present the new-window event as "New Window"
instead of "New-window".
This commit is contained in:
Kevin Sawicki
2013-04-29 10:49:28 -07:00
parent 994138c7a6
commit 5a84814e27
2 changed files with 12 additions and 1 deletions

View File

@@ -62,7 +62,7 @@ _.mixin
humanizeEventName: (eventName, eventDoc) ->
[namespace, event] = eventName.split(':')
return _.capitalize(namespace) unless event?
return _.undasherize(namespace) unless event?
namespaceDoc = _.undasherize(namespace)
eventDoc ?= _.undasherize(event)