discourse/discourse — pull request #1510 by velesin (2013-10-09 16:06:13+00:00)
Title: refactors Discourse.Model

- binds context to self
- fixes extractByKey method comment (klass is not really optional, without this parameter method breaks)
- removes redundant empty collection checking (if it is empty or undefined, _.each just does not trigger and everything still works as expected)

changes covered by https://github.com/discourse/discourse/blob/master/test/javascripts/models/model_test.js