{"action":"closed","number":321,"pull_request":{"url":"https://api.github.com/repos/FriendsOfCake/crud/pulls/321","id":45344588,"html_url":"https://github.com/FriendsOfCake/crud/pull/321","diff_url":"https://github.com/FriendsOfCake/crud/pull/321.diff","patch_url":"https://github.com/FriendsOfCake/crud/pull/321.patch","issue_url":"https://api.github.com/repos/FriendsOfCake/crud/issues/321","number":321,"state":"closed","locked":false,"title":"optional flash messages","user":{"login":"steefaan","id":5982785,"avatar_url":"https://avatars.githubusercontent.com/u/5982785?v=3","gravatar_id":"","url":"https://api.github.com/users/steefaan","html_url":"https://github.com/steefaan","followers_url":"https://api.github.com/users/steefaan/followers","following_url":"https://api.github.com/users/steefaan/following{/other_user}","gists_url":"https://api.github.com/users/steefaan/gists{/gist_id}","starred_url":"https://api.github.com/users/steefaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steefaan/subscriptions","organizations_url":"https://api.github.com/users/steefaan/orgs","repos_url":"https://api.github.com/users/steefaan/repos","events_url":"https://api.github.com/users/steefaan/events{/privacy}","received_events_url":"https://api.github.com/users/steefaan/received_events","type":"User","site_admin":false},"body":"In general I agree that flash messages are not necessary for api requests. Let me explain with the following use case why an optional flash message may be useful.\r\n\r\nI want to use `deleteAll` in a normal cake template context. Regarding issues with `<form>` in `<form>` I decided to execute `deleteAll` with an AJAX request. Therefore I loaded the API listener to get a well-formed response for my AJAX request. Now I want to refresh my page in jQuery's `success` callback and want to show a flash message to the user after the reload is done.\r\n\r\nWhat do you think?\r\n\r\nEDIT:\r\nAs usual, test cases follow after you're fine with the changes itself.","created_at":"2015-09-17T21:31:28Z","updated_at":"2015-09-21T11:04:55Z","closed_at":"2015-09-21T11:04:55Z","merged_at":"2015-09-21T11:04:55Z","merge_commit_sha":"04b5ab038f60201255385e0ace053a8be0c0eac2","assignee":null,"milestone":{"url":"https://api.github.com/repos/FriendsOfCake/crud/milestones/2","html_url":"https://github.com/FriendsOfCake/crud/milestones/4.0.0","labels_url":"https://api.github.com/repos/FriendsOfCake/crud/milestones/2/labels","id":396830,"number":2,"title":"4.0.0","description":"","creator":{"login":"jippi","id":22841,"avatar_url":"https://avatars.githubusercontent.com/u/22841?v=3","gravatar_id":"","url":"https://api.github.com/users/jippi","html_url":"https://github.com/jippi","followers_url":"https://api.github.com/users/jippi/followers","following_url":"https://api.github.com/users/jippi/following{/other_user}","gists_url":"https://api.github.com/users/jippi/gists{/gist_id}","starred_url":"https://api.github.com/users/jippi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jippi/subscriptions","organizations_url":"https://api.github.com/users/jippi/orgs","repos_url":"https://api.github.com/users/jippi/repos","events_url":"https://api.github.com/users/jippi/events{/privacy}","received_events_url":"https://api.github.com/users/jippi/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":47,"state":"open","created_at":"2013-08-07T17:40:04Z","updated_at":"2015-09-21T11:04:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/FriendsOfCake/crud/pulls/321/commits","review_comments_url":"https://api.github.com/repos/FriendsOfCake/crud/pulls/321/comments","review_comment_url":"https://api.github.com/repos/FriendsOfCake/crud/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfCake/crud/issues/321/comments","statuses_url":"https://api.github.com/repos/FriendsOfCake/crud/statuses/993be554c868fe754bbc486c1acb462269bbbde5","head":{"label":"steefaan:master-api-listener","ref":"master-api-listener","sha":"993be554c868fe754bbc486c1acb462269bbbde5","user":{"login":"steefaan","id":5982785,"avatar_url":"https://avatars.githubusercontent.com/u/5982785?v=3","gravatar_id":"","url":"https://api.github.com/users/steefaan","html_url":"https://github.com/steefaan","followers_url":"https://api.github.com/users/steefaan/followers","following_url":"https://api.github.com/users/steefaan/following{/other_user}","gists_url":"https://api.github.com/users/steefaan/gists{/gist_id}","starred_url":"https://api.github.com/users/steefaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steefaan/subscriptions","organizations_url":"https://api.github.com/users/steefaan/orgs","repos_url":"https://api.github.com/users/steefaan/repos","events_url":"https://api.github.com/users/steefaan/events{/privacy}","received_events_url":"https://api.github.com/users/steefaan/received_events","type":"User","site_admin":false},"repo":{"id":40565562,"name":"crud","full_name":"steefaan/crud","owner":{"login":"steefaan","id":5982785,"avatar_url":"https://avatars.githubusercontent.com/u/5982785?v=3","gravatar_id":"","url":"https://api.github.com/users/steefaan","html_url":"https://github.com/steefaan","followers_url":"https://api.github.com/users/steefaan/followers","following_url":"https://api.github.com/users/steefaan/following{/other_user}","gists_url":"https://api.github.com/users/steefaan/gists{/gist_id}","starred_url":"https://api.github.com/users/steefaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steefaan/subscriptions","organizations_url":"https://api.github.com/users/steefaan/orgs","repos_url":"https://api.github.com/users/steefaan/repos","events_url":"https://api.github.com/users/steefaan/events{/privacy}","received_events_url":"https://api.github.com/users/steefaan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/steefaan/crud","description":"CakePHP Application development on steroids - rapid prototyping / scaffolding & production ready code - JSON APIs and more","fork":true,"url":"https://api.github.com/repos/steefaan/crud","forks_url":"https://api.github.com/repos/steefaan/crud/forks","keys_url":"https://api.github.com/repos/steefaan/crud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/steefaan/crud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/steefaan/crud/teams","hooks_url":"https://api.github.com/repos/steefaan/crud/hooks","issue_events_url":"https://api.github.com/repos/steefaan/crud/issues/events{/number}","events_url":"https://api.github.com/repos/steefaan/crud/events","assignees_url":"https://api.github.com/repos/steefaan/crud/assignees{/user}","branches_url":"https://api.github.com/repos/steefaan/crud/branches{/branch}","tags_url":"https://api.github.com/repos/steefaan/crud/tags","blobs_url":"https://api.github.com/repos/steefaan/crud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/steefaan/crud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/steefaan/crud/git/refs{/sha}","trees_url":"https://api.github.com/repos/steefaan/crud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/steefaan/crud/statuses/{sha}","languages_url":"https://api.github.com/repos/steefaan/crud/languages","stargazers_url":"https://api.github.com/repos/steefaan/crud/stargazers","contributors_url":"https://api.github.com/repos/steefaan/crud/contributors","subscribers_url":"https://api.github.com/repos/steefaan/crud/subscribers","subscription_url":"https://api.github.com/repos/steefaan/crud/subscription","commits_url":"https://api.github.com/repos/steefaan/crud/commits{/sha}","git_commits_url":"https://api.github.com/repos/steefaan/crud/git/commits{/sha}","comments_url":"https://api.github.com/repos/steefaan/crud/comments{/number}","issue_comment_url":"https://api.github.com/repos/steefaan/crud/issues/comments{/number}","contents_url":"https://api.github.com/repos/steefaan/crud/contents/{+path}","compare_url":"https://api.github.com/repos/steefaan/crud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/steefaan/crud/merges","archive_url":"https://api.github.com/repos/steefaan/crud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/steefaan/crud/downloads","issues_url":"https://api.github.com/repos/steefaan/crud/issues{/number}","pulls_url":"https://api.github.com/repos/steefaan/crud/pulls{/number}","milestones_url":"https://api.github.com/repos/steefaan/crud/milestones{/number}","notifications_url":"https://api.github.com/repos/steefaan/crud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/steefaan/crud/labels{/name}","releases_url":"https://api.github.com/repos/steefaan/crud/releases{/id}","created_at":"2015-08-11T21:13:57Z","updated_at":"2015-08-11T21:13:58Z","pushed_at":"2015-09-18T09:05:36Z","git_url":"git://github.com/steefaan/crud.git","ssh_url":"git@github.com:steefaan/crud.git","clone_url":"https://github.com/steefaan/crud.git","svn_url":"https://github.com/steefaan/crud","homepage":"http://crud.readthedocs.org/en/latest/","size":9761,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FriendsOfCake:master","ref":"master","sha":"feab98409927b551d9b3d18abe5c0aff84be2cb8","user":{"login":"FriendsOfCake","id":5203126,"avatar_url":"https://avatars.githubusercontent.com/u/5203126?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfCake","html_url":"https://github.com/FriendsOfCake","followers_url":"https://api.github.com/users/FriendsOfCake/followers","following_url":"https://api.github.com/users/FriendsOfCake/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfCake/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfCake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfCake/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfCake/orgs","repos_url":"https://api.github.com/users/FriendsOfCake/repos","events_url":"https://api.github.com/users/FriendsOfCake/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfCake/received_events","type":"Organization","site_admin":false},"repo":{"id":10498102,"name":"crud","full_name":"FriendsOfCake/crud","owner":{"login":"FriendsOfCake","id":5203126,"avatar_url":"https://avatars.githubusercontent.com/u/5203126?v=3","gravatar_id":"","url":"https://api.github.com/users/FriendsOfCake","html_url":"https://github.com/FriendsOfCake","followers_url":"https://api.github.com/users/FriendsOfCake/followers","following_url":"https://api.github.com/users/FriendsOfCake/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfCake/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfCake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfCake/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfCake/orgs","repos_url":"https://api.github.com/users/FriendsOfCake/repos","events_url":"https://api.github.com/users/FriendsOfCake/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfCake/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfCake/crud","description":"CakePHP Application development on steroids - rapid prototyping / scaffolding & production ready code - JSON APIs and more","fork":false,"url":"https://api.github.com/repos/FriendsOfCake/crud","forks_url":"https://api.github.com/repos/FriendsOfCake/crud/forks","keys_url":"https://api.github.com/repos/FriendsOfCake/crud/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfCake/crud/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfCake/crud/teams","hooks_url":"https://api.github.com/repos/FriendsOfCake/crud/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfCake/crud/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfCake/crud/events","assignees_url":"https://api.github.com/repos/FriendsOfCake/crud/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfCake/crud/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfCake/crud/tags","blobs_url":"https://api.github.com/repos/FriendsOfCake/crud/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfCake/crud/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfCake/crud/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfCake/crud/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfCake/crud/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfCake/crud/languages","stargazers_url":"https://api.github.com/repos/FriendsOfCake/crud/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfCake/crud/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfCake/crud/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfCake/crud/subscription","commits_url":"https://api.github.com/repos/FriendsOfCake/crud/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfCake/crud/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfCake/crud/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfCake/crud/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfCake/crud/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfCake/crud/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfCake/crud/merges","archive_url":"https://api.github.com/repos/FriendsOfCake/crud/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfCake/crud/downloads","issues_url":"https://api.github.com/repos/FriendsOfCake/crud/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfCake/crud/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfCake/crud/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfCake/crud/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfCake/crud/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfCake/crud/releases{/id}","created_at":"2013-06-05T08:21:11Z","updated_at":"2015-08-18T15:04:07Z","pushed_at":"2015-09-21T11:04:55Z","git_url":"git://github.com/FriendsOfCake/crud.git","ssh_url":"git@github.com:FriendsOfCake/crud.git","clone_url":"https://github.com/FriendsOfCake/crud.git","svn_url":"https://github.com/FriendsOfCake/crud","homepage":"http://crud.readthedocs.org/en/latest/","size":16139,"stargazers_count":188,"watchers_count":188,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":72,"mirror_url":null,"open_issues_count":4,"forks":72,"open_issues":4,"watchers":188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfCake/crud/pulls/321"},"html":{"href":"https://github.com/FriendsOfCake/crud/pull/321"},"issue":{"href":"https://api.github.com/repos/FriendsOfCake/crud/issues/321"},"comments":{"href":"https://api.github.com/repos/FriendsOfCake/crud/issues/321/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfCake/crud/pulls/321/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfCake/crud/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfCake/crud/pulls/321/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfCake/crud/statuses/993be554c868fe754bbc486c1acb462269bbbde5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"ADmad","id":142658,"avatar_url":"https://avatars.githubusercontent.com/u/142658?v=3","gravatar_id":"","url":"https://api.github.com/users/ADmad","html_url":"https://github.com/ADmad","followers_url":"https://api.github.com/users/ADmad/followers","following_url":"https://api.github.com/users/ADmad/following{/other_user}","gists_url":"https://api.github.com/users/ADmad/gists{/gist_id}","starred_url":"https://api.github.com/users/ADmad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADmad/subscriptions","organizations_url":"https://api.github.com/users/ADmad/orgs","repos_url":"https://api.github.com/users/ADmad/repos","events_url":"https://api.github.com/users/ADmad/events{/privacy}","received_events_url":"https://api.github.com/users/ADmad/received_events","type":"User","site_admin":false},"comments":5,"review_comments":1,"commits":2,"additions":38,"deletions":3,"changed_files":2}}