airbnb/rendr — pull request #7 by Simonify (2013-04-04 05:03:19+00:00)
Title: postInitialize fix

`@postInitialize` is currently being called being twice when using the `AppView` class.

`AppView` extends `BaseView` which calls `@postInitialize` in it's constructor and `AppView` itself calls `@postInitialize` in its `initialize` function. Calling the method twice could cause some users issues such as event's being bound more than once, etc.

I've changed the behaviour so that `BaseView` has an `initialize` function (which will be called by `Backbone.View`) which is only responsible for calling the `postInitialize` method. `AppView` now also calls `@postInitialize` at the end of the initialize function (or it could just call `super` which would do the same thing - depends on how you want the code to read).

The changes reflect the behaviour I would personally expect but you may want to test it out as I haven't spent that much time so far looking at the code (it works with my local Rendr app though).