{"action":"created","comment":{"url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/comments/211472464","pull_request_review_id":147897824,"id":211472464,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTQ3MjQ2NA==","diff_hunk":"@@ -36,10 +36,18 @@ def self.registered(app)\n             json data\n           end\n \n-          get_application_waiver = lambda do\n+          get_application_and_waiver = lambda do\n+            application = WRNGApplication.find(params[:id])\n             waiver = Waiver.find_by(application: params[:id])\n-            if waiver\n-              json(waiver)\n+            if application && waiver\n+              if application && (application[:type] == 'camper' || application[:type] == 'volunteer')","path":"routes/applications.rb","position":11,"original_position":11,"commit_id":"7b98596de636cff5c3709cf6d964da97838e76fb","original_commit_id":"7b98596de636cff5c3709cf6d964da97838e76fb","user":{"login":"mkirlin","id":7007666,"node_id":"MDQ6VXNlcjcwMDc2NjY=","avatar_url":"https://avatars2.githubusercontent.com/u/7007666?v=4","gravatar_id":"","url":"https://api.github.com/users/mkirlin","html_url":"https://github.com/mkirlin","followers_url":"https://api.github.com/users/mkirlin/followers","following_url":"https://api.github.com/users/mkirlin/following{/other_user}","gists_url":"https://api.github.com/users/mkirlin/gists{/gist_id}","starred_url":"https://api.github.com/users/mkirlin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkirlin/subscriptions","organizations_url":"https://api.github.com/users/mkirlin/orgs","repos_url":"https://api.github.com/users/mkirlin/repos","events_url":"https://api.github.com/users/mkirlin/events{/privacy}","received_events_url":"https://api.github.com/users/mkirlin/received_events","type":"User","site_admin":false},"body":"You don't need to check for application here, you already did that on ln. 42.","created_at":"2018-08-21T04:01:47Z","updated_at":"2018-08-21T04:10:30Z","html_url":"https://github.com/the-difference-engine/we-r-next-generation/pull/66#discussion_r211472464","pull_request_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/comments/211472464"},"html":{"href":"https://github.com/the-difference-engine/we-r-next-generation/pull/66#discussion_r211472464"},"pull_request":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66","id":209687161,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5Njg3MTYx","html_url":"https://github.com/the-difference-engine/we-r-next-generation/pull/66","diff_url":"https://github.com/the-difference-engine/we-r-next-generation/pull/66.diff","patch_url":"https://github.com/the-difference-engine/we-r-next-generation/pull/66.patch","issue_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/66","number":66,"state":"open","locked":false,"title":"Applications and camps","user":{"login":"jdjustdata","id":32044884,"node_id":"MDQ6VXNlcjMyMDQ0ODg0","avatar_url":"https://avatars1.githubusercontent.com/u/32044884?v=4","gravatar_id":"","url":"https://api.github.com/users/jdjustdata","html_url":"https://github.com/jdjustdata","followers_url":"https://api.github.com/users/jdjustdata/followers","following_url":"https://api.github.com/users/jdjustdata/following{/other_user}","gists_url":"https://api.github.com/users/jdjustdata/gists{/gist_id}","starred_url":"https://api.github.com/users/jdjustdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdjustdata/subscriptions","organizations_url":"https://api.github.com/users/jdjustdata/orgs","repos_url":"https://api.github.com/users/jdjustdata/repos","events_url":"https://api.github.com/users/jdjustdata/events{/privacy}","received_events_url":"https://api.github.com/users/jdjustdata/received_events","type":"User","site_admin":false},"body":"### Ticket Number:\r\n\r\n\r\n\r\n### Describe The Problem Being Solved:\r\nCombines changes from several PRs\r\n- adds update password to helper\r\n- changes helper parameter check to >= to account for non-required fields\r\n- adds address information to profile model\r\n- handles profile edit on profiles routes\r\n- modifies camp session model to manage timestamps with sinatra -- removes the created_at and updated_at fields and datetime types -- this was causing a problem when querying data because the previously submitted data was stored in the database as a string\r\n- changes the get application route to get application, waiver, and camp session in one api call, instead of multiple calls in sequence\r\n\r\n\r\n### Checklist For Submitter\r\n\r\n* [ ] I have documented all new functionality\r\n* [ ] I have screenshotted new UI changes and attached them to this PR\r\n\r\n### Checklist For Reviewer\r\n* [ ] Code formatting/static analysis: is the code formatted properly? Does a linter/other form of static analysis reveal any issues? Does the code have appropriately low cyclomatic complexity?\r\n* [ ] Code architecture: concerns are separated, code follows single-responsibility principle, code utilizes OOP, DRY code.\r\n* [ ] Coding best practices: code avoids hard-coded variables, inefficient computations, reinventing the wheel when using frameworks. Code is well-commented and generally readable.\r\n* [ ] Non-functional requirements: Code has accompanying tests (if using TDD). Programmer can easily explain decisions to reviewers. \r\n","created_at":"2018-08-21T01:48:23Z","updated_at":"2018-08-21T04:10:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"053c8751e7721029b7623e4d6314b49843b17441","assignee":null,"assignees":[],"requested_reviewers":[{"login":"zachgarwood","id":2098951,"node_id":"MDQ6VXNlcjIwOTg5NTE=","avatar_url":"https://avatars0.githubusercontent.com/u/2098951?v=4","gravatar_id":"","url":"https://api.github.com/users/zachgarwood","html_url":"https://github.com/zachgarwood","followers_url":"https://api.github.com/users/zachgarwood/followers","following_url":"https://api.github.com/users/zachgarwood/following{/other_user}","gists_url":"https://api.github.com/users/zachgarwood/gists{/gist_id}","starred_url":"https://api.github.com/users/zachgarwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zachgarwood/subscriptions","organizations_url":"https://api.github.com/users/zachgarwood/orgs","repos_url":"https://api.github.com/users/zachgarwood/repos","events_url":"https://api.github.com/users/zachgarwood/events{/privacy}","received_events_url":"https://api.github.com/users/zachgarwood/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66/commits","review_comments_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66/comments","review_comment_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/comments{/number}","comments_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/66/comments","statuses_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/statuses/7b98596de636cff5c3709cf6d964da97838e76fb","head":{"label":"the-difference-engine:applications-and-camps","ref":"applications-and-camps","sha":"7b98596de636cff5c3709cf6d964da97838e76fb","user":{"login":"the-difference-engine","id":18339678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzM5Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/18339678?v=4","gravatar_id":"","url":"https://api.github.com/users/the-difference-engine","html_url":"https://github.com/the-difference-engine","followers_url":"https://api.github.com/users/the-difference-engine/followers","following_url":"https://api.github.com/users/the-difference-engine/following{/other_user}","gists_url":"https://api.github.com/users/the-difference-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/the-difference-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-difference-engine/subscriptions","organizations_url":"https://api.github.com/users/the-difference-engine/orgs","repos_url":"https://api.github.com/users/the-difference-engine/repos","events_url":"https://api.github.com/users/the-difference-engine/events{/privacy}","received_events_url":"https://api.github.com/users/the-difference-engine/received_events","type":"Organization","site_admin":false},"repo":{"id":106356829,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYzNTY4Mjk=","name":"we-r-next-generation","full_name":"the-difference-engine/we-r-next-generation","owner":{"login":"the-difference-engine","id":18339678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzM5Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/18339678?v=4","gravatar_id":"","url":"https://api.github.com/users/the-difference-engine","html_url":"https://github.com/the-difference-engine","followers_url":"https://api.github.com/users/the-difference-engine/followers","following_url":"https://api.github.com/users/the-difference-engine/following{/other_user}","gists_url":"https://api.github.com/users/the-difference-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/the-difference-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-difference-engine/subscriptions","organizations_url":"https://api.github.com/users/the-difference-engine/orgs","repos_url":"https://api.github.com/users/the-difference-engine/repos","events_url":"https://api.github.com/users/the-difference-engine/events{/privacy}","received_events_url":"https://api.github.com/users/the-difference-engine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/the-difference-engine/we-r-next-generation","description":"WeRNextGeneration api","fork":false,"url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation","forks_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/forks","keys_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/teams","hooks_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/hooks","issue_events_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/events{/number}","events_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/events","assignees_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/assignees{/user}","branches_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/branches{/branch}","tags_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/tags","blobs_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/statuses/{sha}","languages_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/languages","stargazers_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/stargazers","contributors_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/contributors","subscribers_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/subscribers","subscription_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/subscription","commits_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/contents/{+path}","compare_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/merges","archive_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/downloads","issues_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues{/number}","pulls_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls{/number}","milestones_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/milestones{/number}","notifications_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/labels{/name}","releases_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/releases{/id}","deployments_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/deployments","created_at":"2017-10-10T02:06:02Z","updated_at":"2018-08-21T01:30:19Z","pushed_at":"2018-08-21T03:19:59Z","git_url":"git://github.com/the-difference-engine/we-r-next-generation.git","ssh_url":"git@github.com:the-difference-engine/we-r-next-generation.git","clone_url":"https://github.com/the-difference-engine/we-r-next-generation.git","svn_url":"https://github.com/the-difference-engine/we-r-next-generation","homepage":null,"size":200,"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":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"the-difference-engine:master","ref":"master","sha":"857d1e42393d939d3e082c05542c231c78d7468e","user":{"login":"the-difference-engine","id":18339678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzM5Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/18339678?v=4","gravatar_id":"","url":"https://api.github.com/users/the-difference-engine","html_url":"https://github.com/the-difference-engine","followers_url":"https://api.github.com/users/the-difference-engine/followers","following_url":"https://api.github.com/users/the-difference-engine/following{/other_user}","gists_url":"https://api.github.com/users/the-difference-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/the-difference-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-difference-engine/subscriptions","organizations_url":"https://api.github.com/users/the-difference-engine/orgs","repos_url":"https://api.github.com/users/the-difference-engine/repos","events_url":"https://api.github.com/users/the-difference-engine/events{/privacy}","received_events_url":"https://api.github.com/users/the-difference-engine/received_events","type":"Organization","site_admin":false},"repo":{"id":106356829,"node_id":"MDEwOlJlcG9zaXRvcnkxMDYzNTY4Mjk=","name":"we-r-next-generation","full_name":"the-difference-engine/we-r-next-generation","owner":{"login":"the-difference-engine","id":18339678,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE4MzM5Njc4","avatar_url":"https://avatars0.githubusercontent.com/u/18339678?v=4","gravatar_id":"","url":"https://api.github.com/users/the-difference-engine","html_url":"https://github.com/the-difference-engine","followers_url":"https://api.github.com/users/the-difference-engine/followers","following_url":"https://api.github.com/users/the-difference-engine/following{/other_user}","gists_url":"https://api.github.com/users/the-difference-engine/gists{/gist_id}","starred_url":"https://api.github.com/users/the-difference-engine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the-difference-engine/subscriptions","organizations_url":"https://api.github.com/users/the-difference-engine/orgs","repos_url":"https://api.github.com/users/the-difference-engine/repos","events_url":"https://api.github.com/users/the-difference-engine/events{/privacy}","received_events_url":"https://api.github.com/users/the-difference-engine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/the-difference-engine/we-r-next-generation","description":"WeRNextGeneration api","fork":false,"url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation","forks_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/forks","keys_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/keys{/key_id}","collaborators_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/teams","hooks_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/hooks","issue_events_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/events{/number}","events_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/events","assignees_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/assignees{/user}","branches_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/branches{/branch}","tags_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/tags","blobs_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/refs{/sha}","trees_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/trees{/sha}","statuses_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/statuses/{sha}","languages_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/languages","stargazers_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/stargazers","contributors_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/contributors","subscribers_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/subscribers","subscription_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/subscription","commits_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/commits{/sha}","git_commits_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/git/commits{/sha}","comments_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/comments{/number}","issue_comment_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/comments{/number}","contents_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/contents/{+path}","compare_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/compare/{base}...{head}","merges_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/merges","archive_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/downloads","issues_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues{/number}","pulls_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls{/number}","milestones_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/milestones{/number}","notifications_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/labels{/name}","releases_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/releases{/id}","deployments_url":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/deployments","created_at":"2017-10-10T02:06:02Z","updated_at":"2018-08-21T01:30:19Z","pushed_at":"2018-08-21T03:19:59Z","git_url":"git://github.com/the-difference-engine/we-r-next-generation.git","ssh_url":"git@github.com:the-difference-engine/we-r-next-generation.git","clone_url":"https://github.com/the-difference-engine/we-r-next-generation.git","svn_url":"https://github.com/the-difference-engine/we-r-next-generation","homepage":null,"size":200,"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":1,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":1,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66"},"html":{"href":"https://github.com/the-difference-engine/we-r-next-generation/pull/66"},"issue":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/66"},"comments":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/the-difference-engine/we-r-next-generation/statuses/7b98596de636cff5c3709cf6d964da97838e76fb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mkirlin"}}