{"action":"created","comment":{"url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/comments/54363038","id":54363038,"diff_hunk":"@@ -322,40 +495,111 @@\n     checkIfModelsAreStale: function() {\n       var staleModels = {},\n         currentHashValues = this.__generateAllHashValues();\n-      _.each(this.__getAllModels(true), function(model) {\n+      _.each(this.getTrackedModels(), function(model) {\n         this.isModelStale(model, staleModels, currentHashValues);\n       }, this);\n       return _.values(staleModels);\n     },\n \n+    /************** Private methods **************/\n+\n     /**\n-     * Sets up a listener to update the form model if the model's field changes.\n+     * Sets up a listener to update the form model if the model's field (or any field) changes.\n      * @param model {Backbone.Model} the object model from which this form model will start listen to changes\n-     * @param field {String} the field name that it will start listening to.\n-     * @method listenToModelField\n+     * @param [field] {String} the field name that it will start listening to. If no field is given, it will listen to the general 'change' event.\n+     * @method __listenToModelField\n+     * @private\n      */\n-    listenToModelField: function(model, field) {\n-      var eventName = 'change:' + field;\n-      this.listenTo(model, eventName, _.bind(this.__updateFormField,\n-          {formModel: this, field: field}));\n+    __listenToModelField: function(model, field) {\n+      var eventName = field ? ('change:' + field) : 'change';\n+      var callback = field ? _.bind(this.__updateFormField, {formModel: this, field: field}) : this.__updateFormModel;","path":"modules/FormModel.js","position":513,"original_position":513,"commit_id":"38c970c926ef5d936bf0f8315be732422139cf86","original_commit_id":"38c970c926ef5d936bf0f8315be732422139cf86","user":{"login":"mandragorn","id":807561,"avatar_url":"https://avatars.githubusercontent.com/u/807561?v=3","gravatar_id":"","url":"https://api.github.com/users/mandragorn","html_url":"https://github.com/mandragorn","followers_url":"https://api.github.com/users/mandragorn/followers","following_url":"https://api.github.com/users/mandragorn/following{/other_user}","gists_url":"https://api.github.com/users/mandragorn/gists{/gist_id}","starred_url":"https://api.github.com/users/mandragorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mandragorn/subscriptions","organizations_url":"https://api.github.com/users/mandragorn/orgs","repos_url":"https://api.github.com/users/mandragorn/repos","events_url":"https://api.github.com/users/mandragorn/events{/privacy}","received_events_url":"https://api.github.com/users/mandragorn/received_events","type":"User","site_admin":false},"body":"there is a lot going on in this line, can it be split up for readability?","created_at":"2016-02-29T01:52:24Z","updated_at":"2016-02-29T01:52:24Z","html_url":"https://github.com/vecnatechnologies/backbone-torso/pull/211#discussion_r54363038","pull_request_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/comments/54363038"},"html":{"href":"https://github.com/vecnatechnologies/backbone-torso/pull/211#discussion_r54363038"},"pull_request":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211","id":60955510,"html_url":"https://github.com/vecnatechnologies/backbone-torso/pull/211","diff_url":"https://github.com/vecnatechnologies/backbone-torso/pull/211.diff","patch_url":"https://github.com/vecnatechnologies/backbone-torso/pull/211.patch","issue_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues/211","number":211,"state":"open","locked":false,"title":"#209, #70, #210 - FormModel refactoring","user":{"login":"kentmw","id":426396,"avatar_url":"https://avatars.githubusercontent.com/u/426396?v=3","gravatar_id":"","url":"https://api.github.com/users/kentmw","html_url":"https://github.com/kentmw","followers_url":"https://api.github.com/users/kentmw/followers","following_url":"https://api.github.com/users/kentmw/following{/other_user}","gists_url":"https://api.github.com/users/kentmw/gists{/gist_id}","starred_url":"https://api.github.com/users/kentmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentmw/subscriptions","organizations_url":"https://api.github.com/users/kentmw/orgs","repos_url":"https://api.github.com/users/kentmw/repos","events_url":"https://api.github.com/users/kentmw/events{/privacy}","received_events_url":"https://api.github.com/users/kentmw/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-27T16:23:39Z","updated_at":"2016-02-29T01:52:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"883be38f8475cc68c81ebd559e9ecb5cc6d4b483","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211/commits","review_comments_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211/comments","review_comment_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues/211/comments","statuses_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/statuses/38c970c926ef5d936bf0f8315be732422139cf86","head":{"label":"kentmw:master","ref":"master","sha":"38c970c926ef5d936bf0f8315be732422139cf86","user":{"login":"kentmw","id":426396,"avatar_url":"https://avatars.githubusercontent.com/u/426396?v=3","gravatar_id":"","url":"https://api.github.com/users/kentmw","html_url":"https://github.com/kentmw","followers_url":"https://api.github.com/users/kentmw/followers","following_url":"https://api.github.com/users/kentmw/following{/other_user}","gists_url":"https://api.github.com/users/kentmw/gists{/gist_id}","starred_url":"https://api.github.com/users/kentmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentmw/subscriptions","organizations_url":"https://api.github.com/users/kentmw/orgs","repos_url":"https://api.github.com/users/kentmw/repos","events_url":"https://api.github.com/users/kentmw/events{/privacy}","received_events_url":"https://api.github.com/users/kentmw/received_events","type":"User","site_admin":false},"repo":{"id":31971387,"name":"backbone-torso","full_name":"kentmw/backbone-torso","owner":{"login":"kentmw","id":426396,"avatar_url":"https://avatars.githubusercontent.com/u/426396?v=3","gravatar_id":"","url":"https://api.github.com/users/kentmw","html_url":"https://github.com/kentmw","followers_url":"https://api.github.com/users/kentmw/followers","following_url":"https://api.github.com/users/kentmw/following{/other_user}","gists_url":"https://api.github.com/users/kentmw/gists{/gist_id}","starred_url":"https://api.github.com/users/kentmw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kentmw/subscriptions","organizations_url":"https://api.github.com/users/kentmw/orgs","repos_url":"https://api.github.com/users/kentmw/repos","events_url":"https://api.github.com/users/kentmw/events{/privacy}","received_events_url":"https://api.github.com/users/kentmw/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kentmw/backbone-torso","description":"A holistic approach to Backbone applications","fork":true,"url":"https://api.github.com/repos/kentmw/backbone-torso","forks_url":"https://api.github.com/repos/kentmw/backbone-torso/forks","keys_url":"https://api.github.com/repos/kentmw/backbone-torso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kentmw/backbone-torso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kentmw/backbone-torso/teams","hooks_url":"https://api.github.com/repos/kentmw/backbone-torso/hooks","issue_events_url":"https://api.github.com/repos/kentmw/backbone-torso/issues/events{/number}","events_url":"https://api.github.com/repos/kentmw/backbone-torso/events","assignees_url":"https://api.github.com/repos/kentmw/backbone-torso/assignees{/user}","branches_url":"https://api.github.com/repos/kentmw/backbone-torso/branches{/branch}","tags_url":"https://api.github.com/repos/kentmw/backbone-torso/tags","blobs_url":"https://api.github.com/repos/kentmw/backbone-torso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kentmw/backbone-torso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kentmw/backbone-torso/git/refs{/sha}","trees_url":"https://api.github.com/repos/kentmw/backbone-torso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kentmw/backbone-torso/statuses/{sha}","languages_url":"https://api.github.com/repos/kentmw/backbone-torso/languages","stargazers_url":"https://api.github.com/repos/kentmw/backbone-torso/stargazers","contributors_url":"https://api.github.com/repos/kentmw/backbone-torso/contributors","subscribers_url":"https://api.github.com/repos/kentmw/backbone-torso/subscribers","subscription_url":"https://api.github.com/repos/kentmw/backbone-torso/subscription","commits_url":"https://api.github.com/repos/kentmw/backbone-torso/commits{/sha}","git_commits_url":"https://api.github.com/repos/kentmw/backbone-torso/git/commits{/sha}","comments_url":"https://api.github.com/repos/kentmw/backbone-torso/comments{/number}","issue_comment_url":"https://api.github.com/repos/kentmw/backbone-torso/issues/comments{/number}","contents_url":"https://api.github.com/repos/kentmw/backbone-torso/contents/{+path}","compare_url":"https://api.github.com/repos/kentmw/backbone-torso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kentmw/backbone-torso/merges","archive_url":"https://api.github.com/repos/kentmw/backbone-torso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kentmw/backbone-torso/downloads","issues_url":"https://api.github.com/repos/kentmw/backbone-torso/issues{/number}","pulls_url":"https://api.github.com/repos/kentmw/backbone-torso/pulls{/number}","milestones_url":"https://api.github.com/repos/kentmw/backbone-torso/milestones{/number}","notifications_url":"https://api.github.com/repos/kentmw/backbone-torso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kentmw/backbone-torso/labels{/name}","releases_url":"https://api.github.com/repos/kentmw/backbone-torso/releases{/id}","deployments_url":"https://api.github.com/repos/kentmw/backbone-torso/deployments","created_at":"2015-03-10T17:25:00Z","updated_at":"2016-02-22T19:29:15Z","pushed_at":"2016-02-28T16:36:55Z","git_url":"git://github.com/kentmw/backbone-torso.git","ssh_url":"git@github.com:kentmw/backbone-torso.git","clone_url":"https://github.com/kentmw/backbone-torso.git","svn_url":"https://github.com/kentmw/backbone-torso","homepage":"http://vecnatechnologies.github.io/backbone-torso","size":3299,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"vecnatechnologies:master","ref":"master","sha":"a42d9de24e028f2e9566ac4eace96b5309abbb99","user":{"login":"vecnatechnologies","id":781589,"avatar_url":"https://avatars.githubusercontent.com/u/781589?v=3","gravatar_id":"","url":"https://api.github.com/users/vecnatechnologies","html_url":"https://github.com/vecnatechnologies","followers_url":"https://api.github.com/users/vecnatechnologies/followers","following_url":"https://api.github.com/users/vecnatechnologies/following{/other_user}","gists_url":"https://api.github.com/users/vecnatechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/vecnatechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vecnatechnologies/subscriptions","organizations_url":"https://api.github.com/users/vecnatechnologies/orgs","repos_url":"https://api.github.com/users/vecnatechnologies/repos","events_url":"https://api.github.com/users/vecnatechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/vecnatechnologies/received_events","type":"Organization","site_admin":false},"repo":{"id":30879913,"name":"backbone-torso","full_name":"vecnatechnologies/backbone-torso","owner":{"login":"vecnatechnologies","id":781589,"avatar_url":"https://avatars.githubusercontent.com/u/781589?v=3","gravatar_id":"","url":"https://api.github.com/users/vecnatechnologies","html_url":"https://github.com/vecnatechnologies","followers_url":"https://api.github.com/users/vecnatechnologies/followers","following_url":"https://api.github.com/users/vecnatechnologies/following{/other_user}","gists_url":"https://api.github.com/users/vecnatechnologies/gists{/gist_id}","starred_url":"https://api.github.com/users/vecnatechnologies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vecnatechnologies/subscriptions","organizations_url":"https://api.github.com/users/vecnatechnologies/orgs","repos_url":"https://api.github.com/users/vecnatechnologies/repos","events_url":"https://api.github.com/users/vecnatechnologies/events{/privacy}","received_events_url":"https://api.github.com/users/vecnatechnologies/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vecnatechnologies/backbone-torso","description":"A holistic approach to Backbone applications","fork":false,"url":"https://api.github.com/repos/vecnatechnologies/backbone-torso","forks_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/forks","keys_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/teams","hooks_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/hooks","issue_events_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues/events{/number}","events_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/events","assignees_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/assignees{/user}","branches_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/branches{/branch}","tags_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/tags","blobs_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/git/refs{/sha}","trees_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/statuses/{sha}","languages_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/languages","stargazers_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/stargazers","contributors_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/contributors","subscribers_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/subscribers","subscription_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/subscription","commits_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/commits{/sha}","git_commits_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/git/commits{/sha}","comments_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/comments{/number}","issue_comment_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues/comments{/number}","contents_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/contents/{+path}","compare_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/merges","archive_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/downloads","issues_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues{/number}","pulls_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls{/number}","milestones_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/milestones{/number}","notifications_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/labels{/name}","releases_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/releases{/id}","deployments_url":"https://api.github.com/repos/vecnatechnologies/backbone-torso/deployments","created_at":"2015-02-16T17:40:34Z","updated_at":"2016-02-22T03:34:19Z","pushed_at":"2016-02-28T16:36:56Z","git_url":"git://github.com/vecnatechnologies/backbone-torso.git","ssh_url":"git@github.com:vecnatechnologies/backbone-torso.git","clone_url":"https://github.com/vecnatechnologies/backbone-torso.git","svn_url":"https://github.com/vecnatechnologies/backbone-torso","homepage":"http://vecnatechnologies.github.io/backbone-torso","size":3493,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":64,"forks":16,"open_issues":64,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211"},"html":{"href":"https://github.com/vecnatechnologies/backbone-torso/pull/211"},"issue":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues/211"},"comments":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/vecnatechnologies/backbone-torso/statuses/38c970c926ef5d936bf0f8315be732422139cf86"}}}}