{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/choonkeat/attache_rails/pulls/1","id":31823827,"html_url":"https://github.com/choonkeat/attache_rails/pull/1","diff_url":"https://github.com/choonkeat/attache_rails/pull/1.diff","patch_url":"https://github.com/choonkeat/attache_rails/pull/1.patch","issue_url":"https://api.github.com/repos/choonkeat/attache_rails/issues/1","number":1,"state":"closed","locked":false,"title":"Revamp/model helper discard","user":{"login":"choonkeat","id":473,"avatar_url":"https://avatars.githubusercontent.com/u/473?v=3","gravatar_id":"","url":"https://api.github.com/users/choonkeat","html_url":"https://github.com/choonkeat","followers_url":"https://api.github.com/users/choonkeat/followers","following_url":"https://api.github.com/users/choonkeat/following{/other_user}","gists_url":"https://api.github.com/users/choonkeat/gists{/gist_id}","starred_url":"https://api.github.com/users/choonkeat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choonkeat/subscriptions","organizations_url":"https://api.github.com/users/choonkeat/orgs","repos_url":"https://api.github.com/users/choonkeat/repos","events_url":"https://api.github.com/users/choonkeat/events{/privacy}","received_events_url":"https://api.github.com/users/choonkeat/received_events","type":"User","site_admin":false},"body":"Changes\r\n- moving to storing entire `json` response per file uploaded (previously only storing the `path`). thus attributes like file size, content type are readily available for manipulation\r\n- moving `multiple` file input to *append* files to the previously uploaded list of files (previously resetting the array). users can manually remove files they don't want, not necessary to reset the existing array\r\n- using model helper methods e.g. `has_many_attaches` instead of view helpers. righting a wrong design.\r\n- adding `attaches_discarded` virtual attribute in model to manage the deletion of those unreferenced files.\r\n  - front-end code will add `path` into the `[attaches_discarded][]` params when a file is removed.\r\n  - on save, the model will ask `attache` server to [remove all files in `attaches_discarded`](https://github.com/choonkeat/attache#delete)\r\n  - controller will need to allow `attaches_discarded: []` in its strong params definition\r\n","created_at":"2015-03-24T13:04:02Z","updated_at":"2015-03-25T09:33:47Z","closed_at":"2015-03-25T09:33:47Z","merged_at":"2015-03-25T09:33:47Z","merge_commit_sha":"8ff686a8609f084d98b763cc4eb16b0c6fc461b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/choonkeat/attache_rails/pulls/1/commits","review_comments_url":"https://api.github.com/repos/choonkeat/attache_rails/pulls/1/comments","review_comment_url":"https://api.github.com/repos/choonkeat/attache_rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/choonkeat/attache_rails/issues/1/comments","statuses_url":"https://api.github.com/repos/choonkeat/attache_rails/statuses/00a63f4a739e26514e233a16f7b8a87012367e3a","head":{"label":"choonkeat:revamp/model_helper_discard","ref":"revamp/model_helper_discard","sha":"00a63f4a739e26514e233a16f7b8a87012367e3a","user":{"login":"choonkeat","id":473,"avatar_url":"https://avatars.githubusercontent.com/u/473?v=3","gravatar_id":"","url":"https://api.github.com/users/choonkeat","html_url":"https://github.com/choonkeat","followers_url":"https://api.github.com/users/choonkeat/followers","following_url":"https://api.github.com/users/choonkeat/following{/other_user}","gists_url":"https://api.github.com/users/choonkeat/gists{/gist_id}","starred_url":"https://api.github.com/users/choonkeat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choonkeat/subscriptions","organizations_url":"https://api.github.com/users/choonkeat/orgs","repos_url":"https://api.github.com/users/choonkeat/repos","events_url":"https://api.github.com/users/choonkeat/events{/privacy}","received_events_url":"https://api.github.com/users/choonkeat/received_events","type":"User","site_admin":false},"repo":{"id":31129266,"name":"attache_rails","full_name":"choonkeat/attache_rails","owner":{"login":"choonkeat","id":473,"avatar_url":"https://avatars.githubusercontent.com/u/473?v=3","gravatar_id":"","url":"https://api.github.com/users/choonkeat","html_url":"https://github.com/choonkeat","followers_url":"https://api.github.com/users/choonkeat/followers","following_url":"https://api.github.com/users/choonkeat/following{/other_user}","gists_url":"https://api.github.com/users/choonkeat/gists{/gist_id}","starred_url":"https://api.github.com/users/choonkeat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choonkeat/subscriptions","organizations_url":"https://api.github.com/users/choonkeat/orgs","repos_url":"https://api.github.com/users/choonkeat/repos","events_url":"https://api.github.com/users/choonkeat/events{/privacy}","received_events_url":"https://api.github.com/users/choonkeat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/choonkeat/attache_rails","description":"Ruby on Rails integration for `attache` server","fork":false,"url":"https://api.github.com/repos/choonkeat/attache_rails","forks_url":"https://api.github.com/repos/choonkeat/attache_rails/forks","keys_url":"https://api.github.com/repos/choonkeat/attache_rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choonkeat/attache_rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choonkeat/attache_rails/teams","hooks_url":"https://api.github.com/repos/choonkeat/attache_rails/hooks","issue_events_url":"https://api.github.com/repos/choonkeat/attache_rails/issues/events{/number}","events_url":"https://api.github.com/repos/choonkeat/attache_rails/events","assignees_url":"https://api.github.com/repos/choonkeat/attache_rails/assignees{/user}","branches_url":"https://api.github.com/repos/choonkeat/attache_rails/branches{/branch}","tags_url":"https://api.github.com/repos/choonkeat/attache_rails/tags","blobs_url":"https://api.github.com/repos/choonkeat/attache_rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choonkeat/attache_rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choonkeat/attache_rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/choonkeat/attache_rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choonkeat/attache_rails/statuses/{sha}","languages_url":"https://api.github.com/repos/choonkeat/attache_rails/languages","stargazers_url":"https://api.github.com/repos/choonkeat/attache_rails/stargazers","contributors_url":"https://api.github.com/repos/choonkeat/attache_rails/contributors","subscribers_url":"https://api.github.com/repos/choonkeat/attache_rails/subscribers","subscription_url":"https://api.github.com/repos/choonkeat/attache_rails/subscription","commits_url":"https://api.github.com/repos/choonkeat/attache_rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/choonkeat/attache_rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/choonkeat/attache_rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/choonkeat/attache_rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/choonkeat/attache_rails/contents/{+path}","compare_url":"https://api.github.com/repos/choonkeat/attache_rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choonkeat/attache_rails/merges","archive_url":"https://api.github.com/repos/choonkeat/attache_rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choonkeat/attache_rails/downloads","issues_url":"https://api.github.com/repos/choonkeat/attache_rails/issues{/number}","pulls_url":"https://api.github.com/repos/choonkeat/attache_rails/pulls{/number}","milestones_url":"https://api.github.com/repos/choonkeat/attache_rails/milestones{/number}","notifications_url":"https://api.github.com/repos/choonkeat/attache_rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choonkeat/attache_rails/labels{/name}","releases_url":"https://api.github.com/repos/choonkeat/attache_rails/releases{/id}","created_at":"2015-02-21T15:14:32Z","updated_at":"2015-03-25T09:33:47Z","pushed_at":"2015-03-25T09:33:47Z","git_url":"git://github.com/choonkeat/attache_rails.git","ssh_url":"git@github.com:choonkeat/attache_rails.git","clone_url":"https://github.com/choonkeat/attache_rails.git","svn_url":"https://github.com/choonkeat/attache_rails","homepage":"https://github.com/choonkeat/attache","size":228,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"choonkeat:master","ref":"master","sha":"9a2a71d29da2d3a263ea2fa7b300364962176687","user":{"login":"choonkeat","id":473,"avatar_url":"https://avatars.githubusercontent.com/u/473?v=3","gravatar_id":"","url":"https://api.github.com/users/choonkeat","html_url":"https://github.com/choonkeat","followers_url":"https://api.github.com/users/choonkeat/followers","following_url":"https://api.github.com/users/choonkeat/following{/other_user}","gists_url":"https://api.github.com/users/choonkeat/gists{/gist_id}","starred_url":"https://api.github.com/users/choonkeat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choonkeat/subscriptions","organizations_url":"https://api.github.com/users/choonkeat/orgs","repos_url":"https://api.github.com/users/choonkeat/repos","events_url":"https://api.github.com/users/choonkeat/events{/privacy}","received_events_url":"https://api.github.com/users/choonkeat/received_events","type":"User","site_admin":false},"repo":{"id":31129266,"name":"attache_rails","full_name":"choonkeat/attache_rails","owner":{"login":"choonkeat","id":473,"avatar_url":"https://avatars.githubusercontent.com/u/473?v=3","gravatar_id":"","url":"https://api.github.com/users/choonkeat","html_url":"https://github.com/choonkeat","followers_url":"https://api.github.com/users/choonkeat/followers","following_url":"https://api.github.com/users/choonkeat/following{/other_user}","gists_url":"https://api.github.com/users/choonkeat/gists{/gist_id}","starred_url":"https://api.github.com/users/choonkeat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choonkeat/subscriptions","organizations_url":"https://api.github.com/users/choonkeat/orgs","repos_url":"https://api.github.com/users/choonkeat/repos","events_url":"https://api.github.com/users/choonkeat/events{/privacy}","received_events_url":"https://api.github.com/users/choonkeat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/choonkeat/attache_rails","description":"Ruby on Rails integration for `attache` server","fork":false,"url":"https://api.github.com/repos/choonkeat/attache_rails","forks_url":"https://api.github.com/repos/choonkeat/attache_rails/forks","keys_url":"https://api.github.com/repos/choonkeat/attache_rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choonkeat/attache_rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choonkeat/attache_rails/teams","hooks_url":"https://api.github.com/repos/choonkeat/attache_rails/hooks","issue_events_url":"https://api.github.com/repos/choonkeat/attache_rails/issues/events{/number}","events_url":"https://api.github.com/repos/choonkeat/attache_rails/events","assignees_url":"https://api.github.com/repos/choonkeat/attache_rails/assignees{/user}","branches_url":"https://api.github.com/repos/choonkeat/attache_rails/branches{/branch}","tags_url":"https://api.github.com/repos/choonkeat/attache_rails/tags","blobs_url":"https://api.github.com/repos/choonkeat/attache_rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choonkeat/attache_rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choonkeat/attache_rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/choonkeat/attache_rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choonkeat/attache_rails/statuses/{sha}","languages_url":"https://api.github.com/repos/choonkeat/attache_rails/languages","stargazers_url":"https://api.github.com/repos/choonkeat/attache_rails/stargazers","contributors_url":"https://api.github.com/repos/choonkeat/attache_rails/contributors","subscribers_url":"https://api.github.com/repos/choonkeat/attache_rails/subscribers","subscription_url":"https://api.github.com/repos/choonkeat/attache_rails/subscription","commits_url":"https://api.github.com/repos/choonkeat/attache_rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/choonkeat/attache_rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/choonkeat/attache_rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/choonkeat/attache_rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/choonkeat/attache_rails/contents/{+path}","compare_url":"https://api.github.com/repos/choonkeat/attache_rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choonkeat/attache_rails/merges","archive_url":"https://api.github.com/repos/choonkeat/attache_rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choonkeat/attache_rails/downloads","issues_url":"https://api.github.com/repos/choonkeat/attache_rails/issues{/number}","pulls_url":"https://api.github.com/repos/choonkeat/attache_rails/pulls{/number}","milestones_url":"https://api.github.com/repos/choonkeat/attache_rails/milestones{/number}","notifications_url":"https://api.github.com/repos/choonkeat/attache_rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choonkeat/attache_rails/labels{/name}","releases_url":"https://api.github.com/repos/choonkeat/attache_rails/releases{/id}","created_at":"2015-02-21T15:14:32Z","updated_at":"2015-03-25T09:33:47Z","pushed_at":"2015-03-25T09:33:47Z","git_url":"git://github.com/choonkeat/attache_rails.git","ssh_url":"git@github.com:choonkeat/attache_rails.git","clone_url":"https://github.com/choonkeat/attache_rails.git","svn_url":"https://github.com/choonkeat/attache_rails","homepage":"https://github.com/choonkeat/attache","size":228,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/choonkeat/attache_rails/pulls/1"},"html":{"href":"https://github.com/choonkeat/attache_rails/pull/1"},"issue":{"href":"https://api.github.com/repos/choonkeat/attache_rails/issues/1"},"comments":{"href":"https://api.github.com/repos/choonkeat/attache_rails/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/choonkeat/attache_rails/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/choonkeat/attache_rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/choonkeat/attache_rails/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/choonkeat/attache_rails/statuses/00a63f4a739e26514e233a16f7b8a87012367e3a"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"choonkeat","id":473,"avatar_url":"https://avatars.githubusercontent.com/u/473?v=3","gravatar_id":"","url":"https://api.github.com/users/choonkeat","html_url":"https://github.com/choonkeat","followers_url":"https://api.github.com/users/choonkeat/followers","following_url":"https://api.github.com/users/choonkeat/following{/other_user}","gists_url":"https://api.github.com/users/choonkeat/gists{/gist_id}","starred_url":"https://api.github.com/users/choonkeat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choonkeat/subscriptions","organizations_url":"https://api.github.com/users/choonkeat/orgs","repos_url":"https://api.github.com/users/choonkeat/repos","events_url":"https://api.github.com/users/choonkeat/events{/privacy}","received_events_url":"https://api.github.com/users/choonkeat/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":5,"additions":265,"deletions":108,"changed_files":10}}