GitHub PullRequestReviewCommentEvent at 2014-04-07 14:10:04
Repository: backbone.marionette
Actor: samccone
Payload: {"comment":{"url":"https://api.github.com/repos/marionettejs/backbone.marionette/pulls/comments/11344617","id":11344617,"diff_hunk":"@@ -116,13 +116,17 @@ _.extend(Marionette.Region.prototype, Backbone.Events, {\n   // directly from the `el` attribute. Also calls an optional\n   // `onShow` and `close` method on your view, just after showing\n   // or just before closing the view, respectively.\n-  show: function(view){\n+  // Use the shouldDestroy option to specify whether the old view\n+  // should be destroyed.\n+  show: function(view, options){\n     this.ensureEl();\n \n+    var showOptions = options || {};\n     var isViewClosed = view.isClosed || _.isUndefined(view.$el);\n     var isDifferentView = view !== this.currentView;\n+    var shouldDestroy =  !_.isUndefined(showOptions.shouldDestroy) ? showOptions.shouldDestroy : true;","path":"src/marionette.region.js","position":13,"original_position":13,"commit_id":"c26b0bd5c3d2617dc6a1c376c5beb514139d1809","original_commit_id":"c26b0bd5c3d2617dc6a1c376c5beb514139d1809","user":{"login":"samccone","id":883126,"avatar_url":"https://avatars.githubusercontent.com/u/883126?","gravatar_id":"41041169880bec75fbe51de48443cefb","url":"https://api.github.com/users/samccone","html_url":"https://github.com/samccone","followers_url":"https://api.github.com/users/samccone/followers","following_url":"https://api.github.com/users/samccone/following{/other_user}","gists_url":"https://api.github.com/users/samccone/gists{/gist_id}","starred_url":"https://api.github.com/users/samccone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samccone/subscriptions","organizations_url":"https://api.github.com/users/samccone/orgs","repos_url":"https://api.github.com/users/samccone/repos","events_url":"https://api.github.com/users/samccone/events{/privacy}","received_events_url":"https://api.github.com/users/samccone/received_events","type":"User","site_admin":false},"body":"Needs inline code documentation explaining this line\r\n\r\nalso instead of shouldDestroy if we change it to `preventDestroy` then this logic becomes\r\n\r\n`var shouldDestroy = !!showOptions.preventDestroy;`","created_at":"2014-04-07T14:10:04Z","updated_at":"2014-04-07T14:10:04Z","html_url":"https://github.com/marionettejs/backbone.marionette/pull/1085#discussion_r11344617","pull_request_url":"https://api.github.com/repos/marionettejs/backbone.marionette/pulls/1085","_links":{"self":{"href":"https://api.github.com/repos/marionettejs/backbone.marionette/pulls/comments/11344617"},"html":{"href":"https://github.com/marionettejs/backbone.marionette/pull/1085#discussion_r11344617"},"pull_request":{"href":"https://api.github.com/repos/marionettejs/backbone.marionette/pulls/1085"}}}}