src/core/core.coffee in luca-0.9.1 vs src/core/core.coffee in luca-0.9.2

- old
+ new

@@ -57,11 +57,16 @@ eval("(window||global).#{ @namespace } = {}") at = Luca.util.resolve(@namespace,(window || global)) at[@componentId] = Luca.extend(@superClassName,@componentName, properties) - # automatically register this with the component registry - Luca.register( _.string.underscored(@componentId), @componentName) + if Luca.autoRegister is true + componentType = "view" if Luca.isViewPrototype( at[@componentId] ) + componentType = "collection" if Luca.isCollectionPrototype( at[@componentId] ) + componentType = "model" if Luca.isModelPrototype( at[@componentId] ) + + # automatically register this with the component registry + Luca.register( _.string.underscored(@componentId), @componentName, componentType) at[@componentId] # The last method of the DefineProxy chain is always going to result in # a call to Luca.extend. Luca.extend wraps the call to Luca.View.extend,