I suggest merging parent events and elements with the child ones in Spine controller.
Let me show you how it will work:
class ParentContoller extends Spine.Controller
class ChildController extends ParentContoller
child = new ChildController()
child.el_1 # => $('.parent-1') element
child.el_2 # => $('.child-2') element
child.el_3 # => $('.child-3') element
The same thing with the events.
Added "elements" and "events" attributes inheritance
I think this is a good idea, I have ran into this before and always thought I should be able to have a base controller class I could extend from and inherit events/elements. Any chance you can write a test to go along with the pull request?
Also I think @constructor.prototype.__proto__ could be written as @constructor.__super__, just a little bit shorter?
@cengebretson thanks for the reply. Do you think that the usage of super is really a good idea? Cause I haven't found any occurrences if it the Spine code. But there is no way I suppose to get the accesstor of the class.
If it's ok I'll fix the super issue and cover that with the tests.
Fixed issue with __super__. Covered with specs.
Added specs for this pull request
thanks for the pull request, very much appreciated.