{"action":"created","comment":{"url":"https://api.github.com/repos/harvard-lil/h2o/pulls/comments/151588823","pull_request_review_id":77323194,"id":151588823,"diff_hunk":"@@ -20,17 +20,19 @@ def present?\n     true\n   end\n \n-  def reflow_contents\n-    reflow_tree tree, ordinals\n+  def reflow_contents(child)\n+    @child = child\n+    reflow_tree(tree, ordinals)\n   end\n \n-  def reflow_tree tree, prefix = []\n+  def reflow_tree(tree, prefix = [])\n     ord = 1\n     tree.each do |element|\n       if element.is_a? Enumerable\n-        reflow_tree element, ord == 1 ? prefix : prefix + [ord-1]\n+        element_prefix = ord == 1 ? prefix : prefix + [ord-1]","path":"app/models/content/concerns/has_children.rb","position":17,"original_position":17,"commit_id":"5c021609482588f2ffd30123e7efff0ef7d924f8","original_commit_id":"5c021609482588f2ffd30123e7efff0ef7d924f8","user":{"login":"edwardloveall","id":49549,"avatar_url":"https://avatars1.githubusercontent.com/u/49549?v=4","gravatar_id":"","url":"https://api.github.com/users/edwardloveall","html_url":"https://github.com/edwardloveall","followers_url":"https://api.github.com/users/edwardloveall/followers","following_url":"https://api.github.com/users/edwardloveall/following{/other_user}","gists_url":"https://api.github.com/users/edwardloveall/gists{/gist_id}","starred_url":"https://api.github.com/users/edwardloveall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edwardloveall/subscriptions","organizations_url":"https://api.github.com/users/edwardloveall/orgs","repos_url":"https://api.github.com/users/edwardloveall/repos","events_url":"https://api.github.com/users/edwardloveall/events{/privacy}","received_events_url":"https://api.github.com/users/edwardloveall/received_events","type":"User","site_admin":false},"body":"Also, are you sure this will do what you want? Maybe I’m missing something, but if you always set ord to 1 at the start of the method, this conditional will always return true. ","created_at":"2017-11-17T02:16:41Z","updated_at":"2017-11-17T02:17:07Z","html_url":"https://github.com/harvard-lil/h2o/pull/198#discussion_r151588823","pull_request_url":"https://api.github.com/repos/harvard-lil/h2o/pulls/198","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/harvard-lil/h2o/pulls/comments/151588823"},"html":{"href":"https://github.com/harvard-lil/h2o/pull/198#discussion_r151588823"},"pull_request":{"href":"https://api.github.com/repos/harvard-lil/h2o/pulls/198"}},"in_reply_to_id":151588263},"pull_request":{"url":"https://api.github.com/repos/harvard-lil/h2o/pulls/198","id":153130472,"html_url":"https://github.com/harvard-lil/h2o/pull/198","diff_url":"https://github.com/harvard-lil/h2o/pull/198.diff","patch_url":"https://github.com/harvard-lil/h2o/pull/198.patch","issue_url":"https://api.github.com/repos/harvard-lil/h2o/issues/198","number":198,"state":"open","locked":false,"title":"Deleting section reflow ordinals","user":{"login":"cgruppioni","id":14900328,"avatar_url":"https://avatars0.githubusercontent.com/u/14900328?v=4","gravatar_id":"","url":"https://api.github.com/users/cgruppioni","html_url":"https://github.com/cgruppioni","followers_url":"https://api.github.com/users/cgruppioni/followers","following_url":"https://api.github.com/users/cgruppioni/following{/other_user}","gists_url":"https://api.github.com/users/cgruppioni/gists{/gist_id}","starred_url":"https://api.github.com/users/cgruppioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgruppioni/subscriptions","organizations_url":"https://api.github.com/users/cgruppioni/orgs","repos_url":"https://api.github.com/users/cgruppioni/repos","events_url":"https://api.github.com/users/cgruppioni/events{/privacy}","received_events_url":"https://api.github.com/users/cgruppioni/received_events","type":"User","site_admin":false},"body":"casebook.contents has data from before the resource/section is destroyed - so passing in the child itself allows you to check if it's been deleted. ","created_at":"2017-11-16T19:34:16Z","updated_at":"2017-11-17T02:17:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d91fd028203724fe36de4be6fdbae856027929d9","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/harvard-lil/h2o/pulls/198/commits","review_comments_url":"https://api.github.com/repos/harvard-lil/h2o/pulls/198/comments","review_comment_url":"https://api.github.com/repos/harvard-lil/h2o/pulls/comments{/number}","comments_url":"https://api.github.com/repos/harvard-lil/h2o/issues/198/comments","statuses_url":"https://api.github.com/repos/harvard-lil/h2o/statuses/5c021609482588f2ffd30123e7efff0ef7d924f8","head":{"label":"cgruppioni:deleting-section-reflow-ordinals","ref":"deleting-section-reflow-ordinals","sha":"5c021609482588f2ffd30123e7efff0ef7d924f8","user":{"login":"cgruppioni","id":14900328,"avatar_url":"https://avatars0.githubusercontent.com/u/14900328?v=4","gravatar_id":"","url":"https://api.github.com/users/cgruppioni","html_url":"https://github.com/cgruppioni","followers_url":"https://api.github.com/users/cgruppioni/followers","following_url":"https://api.github.com/users/cgruppioni/following{/other_user}","gists_url":"https://api.github.com/users/cgruppioni/gists{/gist_id}","starred_url":"https://api.github.com/users/cgruppioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgruppioni/subscriptions","organizations_url":"https://api.github.com/users/cgruppioni/orgs","repos_url":"https://api.github.com/users/cgruppioni/repos","events_url":"https://api.github.com/users/cgruppioni/events{/privacy}","received_events_url":"https://api.github.com/users/cgruppioni/received_events","type":"User","site_admin":false},"repo":{"id":85614260,"name":"h2o-1","full_name":"cgruppioni/h2o-1","owner":{"login":"cgruppioni","id":14900328,"avatar_url":"https://avatars0.githubusercontent.com/u/14900328?v=4","gravatar_id":"","url":"https://api.github.com/users/cgruppioni","html_url":"https://github.com/cgruppioni","followers_url":"https://api.github.com/users/cgruppioni/followers","following_url":"https://api.github.com/users/cgruppioni/following{/other_user}","gists_url":"https://api.github.com/users/cgruppioni/gists{/gist_id}","starred_url":"https://api.github.com/users/cgruppioni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgruppioni/subscriptions","organizations_url":"https://api.github.com/users/cgruppioni/orgs","repos_url":"https://api.github.com/users/cgruppioni/repos","events_url":"https://api.github.com/users/cgruppioni/events{/privacy}","received_events_url":"https://api.github.com/users/cgruppioni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cgruppioni/h2o-1","description":null,"fork":true,"url":"https://api.github.com/repos/cgruppioni/h2o-1","forks_url":"https://api.github.com/repos/cgruppioni/h2o-1/forks","keys_url":"https://api.github.com/repos/cgruppioni/h2o-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cgruppioni/h2o-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cgruppioni/h2o-1/teams","hooks_url":"https://api.github.com/repos/cgruppioni/h2o-1/hooks","issue_events_url":"https://api.github.com/repos/cgruppioni/h2o-1/issues/events{/number}","events_url":"https://api.github.com/repos/cgruppioni/h2o-1/events","assignees_url":"https://api.github.com/repos/cgruppioni/h2o-1/assignees{/user}","branches_url":"https://api.github.com/repos/cgruppioni/h2o-1/branches{/branch}","tags_url":"https://api.github.com/repos/cgruppioni/h2o-1/tags","blobs_url":"https://api.github.com/repos/cgruppioni/h2o-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cgruppioni/h2o-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cgruppioni/h2o-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/cgruppioni/h2o-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cgruppioni/h2o-1/statuses/{sha}","languages_url":"https://api.github.com/repos/cgruppioni/h2o-1/languages","stargazers_url":"https://api.github.com/repos/cgruppioni/h2o-1/stargazers","contributors_url":"https://api.github.com/repos/cgruppioni/h2o-1/contributors","subscribers_url":"https://api.github.com/repos/cgruppioni/h2o-1/subscribers","subscription_url":"https://api.github.com/repos/cgruppioni/h2o-1/subscription","commits_url":"https://api.github.com/repos/cgruppioni/h2o-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/cgruppioni/h2o-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/cgruppioni/h2o-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/cgruppioni/h2o-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/cgruppioni/h2o-1/contents/{+path}","compare_url":"https://api.github.com/repos/cgruppioni/h2o-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cgruppioni/h2o-1/merges","archive_url":"https://api.github.com/repos/cgruppioni/h2o-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cgruppioni/h2o-1/downloads","issues_url":"https://api.github.com/repos/cgruppioni/h2o-1/issues{/number}","pulls_url":"https://api.github.com/repos/cgruppioni/h2o-1/pulls{/number}","milestones_url":"https://api.github.com/repos/cgruppioni/h2o-1/milestones{/number}","notifications_url":"https://api.github.com/repos/cgruppioni/h2o-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cgruppioni/h2o-1/labels{/name}","releases_url":"https://api.github.com/repos/cgruppioni/h2o-1/releases{/id}","deployments_url":"https://api.github.com/repos/cgruppioni/h2o-1/deployments","created_at":"2017-03-20T18:53:09Z","updated_at":"2017-07-24T14:50:55Z","pushed_at":"2017-11-16T22:03:53Z","git_url":"git://github.com/cgruppioni/h2o-1.git","ssh_url":"git@github.com:cgruppioni/h2o-1.git","clone_url":"https://github.com/cgruppioni/h2o-1.git","svn_url":"https://github.com/cgruppioni/h2o-1","homepage":null,"size":35582,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"harvard-lil:master","ref":"master","sha":"33b40dc0daf321237302b1bb996b4e838a4e14bd","user":{"login":"harvard-lil","id":857200,"avatar_url":"https://avatars0.githubusercontent.com/u/857200?v=4","gravatar_id":"","url":"https://api.github.com/users/harvard-lil","html_url":"https://github.com/harvard-lil","followers_url":"https://api.github.com/users/harvard-lil/followers","following_url":"https://api.github.com/users/harvard-lil/following{/other_user}","gists_url":"https://api.github.com/users/harvard-lil/gists{/gist_id}","starred_url":"https://api.github.com/users/harvard-lil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harvard-lil/subscriptions","organizations_url":"https://api.github.com/users/harvard-lil/orgs","repos_url":"https://api.github.com/users/harvard-lil/repos","events_url":"https://api.github.com/users/harvard-lil/events{/privacy}","received_events_url":"https://api.github.com/users/harvard-lil/received_events","type":"Organization","site_admin":false},"repo":{"id":41750736,"name":"h2o","full_name":"harvard-lil/h2o","owner":{"login":"harvard-lil","id":857200,"avatar_url":"https://avatars0.githubusercontent.com/u/857200?v=4","gravatar_id":"","url":"https://api.github.com/users/harvard-lil","html_url":"https://github.com/harvard-lil","followers_url":"https://api.github.com/users/harvard-lil/followers","following_url":"https://api.github.com/users/harvard-lil/following{/other_user}","gists_url":"https://api.github.com/users/harvard-lil/gists{/gist_id}","starred_url":"https://api.github.com/users/harvard-lil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harvard-lil/subscriptions","organizations_url":"https://api.github.com/users/harvard-lil/orgs","repos_url":"https://api.github.com/users/harvard-lil/repos","events_url":"https://api.github.com/users/harvard-lil/events{/privacy}","received_events_url":"https://api.github.com/users/harvard-lil/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/harvard-lil/h2o","description":null,"fork":false,"url":"https://api.github.com/repos/harvard-lil/h2o","forks_url":"https://api.github.com/repos/harvard-lil/h2o/forks","keys_url":"https://api.github.com/repos/harvard-lil/h2o/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harvard-lil/h2o/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harvard-lil/h2o/teams","hooks_url":"https://api.github.com/repos/harvard-lil/h2o/hooks","issue_events_url":"https://api.github.com/repos/harvard-lil/h2o/issues/events{/number}","events_url":"https://api.github.com/repos/harvard-lil/h2o/events","assignees_url":"https://api.github.com/repos/harvard-lil/h2o/assignees{/user}","branches_url":"https://api.github.com/repos/harvard-lil/h2o/branches{/branch}","tags_url":"https://api.github.com/repos/harvard-lil/h2o/tags","blobs_url":"https://api.github.com/repos/harvard-lil/h2o/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harvard-lil/h2o/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harvard-lil/h2o/git/refs{/sha}","trees_url":"https://api.github.com/repos/harvard-lil/h2o/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harvard-lil/h2o/statuses/{sha}","languages_url":"https://api.github.com/repos/harvard-lil/h2o/languages","stargazers_url":"https://api.github.com/repos/harvard-lil/h2o/stargazers","contributors_url":"https://api.github.com/repos/harvard-lil/h2o/contributors","subscribers_url":"https://api.github.com/repos/harvard-lil/h2o/subscribers","subscription_url":"https://api.github.com/repos/harvard-lil/h2o/subscription","commits_url":"https://api.github.com/repos/harvard-lil/h2o/commits{/sha}","git_commits_url":"https://api.github.com/repos/harvard-lil/h2o/git/commits{/sha}","comments_url":"https://api.github.com/repos/harvard-lil/h2o/comments{/number}","issue_comment_url":"https://api.github.com/repos/harvard-lil/h2o/issues/comments{/number}","contents_url":"https://api.github.com/repos/harvard-lil/h2o/contents/{+path}","compare_url":"https://api.github.com/repos/harvard-lil/h2o/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harvard-lil/h2o/merges","archive_url":"https://api.github.com/repos/harvard-lil/h2o/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harvard-lil/h2o/downloads","issues_url":"https://api.github.com/repos/harvard-lil/h2o/issues{/number}","pulls_url":"https://api.github.com/repos/harvard-lil/h2o/pulls{/number}","milestones_url":"https://api.github.com/repos/harvard-lil/h2o/milestones{/number}","notifications_url":"https://api.github.com/repos/harvard-lil/h2o/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harvard-lil/h2o/labels{/name}","releases_url":"https://api.github.com/repos/harvard-lil/h2o/releases{/id}","deployments_url":"https://api.github.com/repos/harvard-lil/h2o/deployments","created_at":"2015-09-01T16:37:44Z","updated_at":"2017-10-06T18:31:46Z","pushed_at":"2017-11-16T22:03:19Z","git_url":"git://github.com/harvard-lil/h2o.git","ssh_url":"git@github.com:harvard-lil/h2o.git","clone_url":"https://github.com/harvard-lil/h2o.git","svn_url":"https://github.com/harvard-lil/h2o","homepage":null,"size":35571,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":33,"forks":5,"open_issues":33,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/harvard-lil/h2o/pulls/198"},"html":{"href":"https://github.com/harvard-lil/h2o/pull/198"},"issue":{"href":"https://api.github.com/repos/harvard-lil/h2o/issues/198"},"comments":{"href":"https://api.github.com/repos/harvard-lil/h2o/issues/198/comments"},"review_comments":{"href":"https://api.github.com/repos/harvard-lil/h2o/pulls/198/comments"},"review_comment":{"href":"https://api.github.com/repos/harvard-lil/h2o/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/harvard-lil/h2o/pulls/198/commits"},"statuses":{"href":"https://api.github.com/repos/harvard-lil/h2o/statuses/5c021609482588f2ffd30123e7efff0ef7d924f8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"edwardloveall"}}