{"action":"closed","number":1477,"pull_request":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1477","id":57571575,"html_url":"https://github.com/rails-api/active_model_serializers/pull/1477","diff_url":"https://github.com/rails-api/active_model_serializers/pull/1477.diff","patch_url":"https://github.com/rails-api/active_model_serializers/pull/1477.patch","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1477","number":1477,"state":"closed","locked":false,"title":"Fixed fragment_cached? method to check if caching","user":{"login":"bdmac","id":47326,"avatar_url":"https://avatars.githubusercontent.com/u/47326?v=3","gravatar_id":"","url":"https://api.github.com/users/bdmac","html_url":"https://github.com/bdmac","followers_url":"https://api.github.com/users/bdmac/followers","following_url":"https://api.github.com/users/bdmac/following{/other_user}","gists_url":"https://api.github.com/users/bdmac/gists{/gist_id}","starred_url":"https://api.github.com/users/bdmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdmac/subscriptions","organizations_url":"https://api.github.com/users/bdmac/orgs","repos_url":"https://api.github.com/users/bdmac/repos","events_url":"https://api.github.com/users/bdmac/events{/privacy}","received_events_url":"https://api.github.com/users/bdmac/received_events","type":"User","site_admin":false},"body":"I noticed that fragment caching does not actually check if caching is\r\nenabled as it seemingly should.\r\n\r\nThe way CachedSerializer#fragment_cached? worked previously would return\r\ntrue even in an environment where caching was disabled as defined by\r\n`ActiveModelSerializers.config.perform_caching`.\r\n\r\nAdded check for `_cache` like in the `cached?` method before checking\r\nwhether `_cache_only` or `_cache_except` is set.\r\n\r\nThere were no existing tests for any of these methods but it's a pretty\r\ntrivial change.","created_at":"2016-01-28T21:48:48Z","updated_at":"2016-02-10T04:32:38Z","closed_at":"2016-02-10T04:32:38Z","merged_at":"2016-02-10T04:32:38Z","merge_commit_sha":"c87888d88bda02582768523c8aebb1047188fdb0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1477/commits","review_comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1477/comments","review_comment_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1477/comments","statuses_url":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/3a092c9b4b4e4c2ed9e568631689e53eac663c0c","head":{"label":"CheckMateIO:bugfix/fix-fragment-cached-check","ref":"bugfix/fix-fragment-cached-check","sha":"3a092c9b4b4e4c2ed9e568631689e53eac663c0c","user":{"login":"CheckMateIO","id":3219568,"avatar_url":"https://avatars.githubusercontent.com/u/3219568?v=3","gravatar_id":"","url":"https://api.github.com/users/CheckMateIO","html_url":"https://github.com/CheckMateIO","followers_url":"https://api.github.com/users/CheckMateIO/followers","following_url":"https://api.github.com/users/CheckMateIO/following{/other_user}","gists_url":"https://api.github.com/users/CheckMateIO/gists{/gist_id}","starred_url":"https://api.github.com/users/CheckMateIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheckMateIO/subscriptions","organizations_url":"https://api.github.com/users/CheckMateIO/orgs","repos_url":"https://api.github.com/users/CheckMateIO/repos","events_url":"https://api.github.com/users/CheckMateIO/events{/privacy}","received_events_url":"https://api.github.com/users/CheckMateIO/received_events","type":"Organization","site_admin":false},"repo":{"id":46526006,"name":"active_model_serializers","full_name":"CheckMateIO/active_model_serializers","owner":{"login":"CheckMateIO","id":3219568,"avatar_url":"https://avatars.githubusercontent.com/u/3219568?v=3","gravatar_id":"","url":"https://api.github.com/users/CheckMateIO","html_url":"https://github.com/CheckMateIO","followers_url":"https://api.github.com/users/CheckMateIO/followers","following_url":"https://api.github.com/users/CheckMateIO/following{/other_user}","gists_url":"https://api.github.com/users/CheckMateIO/gists{/gist_id}","starred_url":"https://api.github.com/users/CheckMateIO/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CheckMateIO/subscriptions","organizations_url":"https://api.github.com/users/CheckMateIO/orgs","repos_url":"https://api.github.com/users/CheckMateIO/repos","events_url":"https://api.github.com/users/CheckMateIO/events{/privacy}","received_events_url":"https://api.github.com/users/CheckMateIO/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CheckMateIO/active_model_serializers","description":"ActiveModel::Serializer implementation and Rails hooks","fork":true,"url":"https://api.github.com/repos/CheckMateIO/active_model_serializers","forks_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/forks","keys_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/teams","hooks_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/hooks","issue_events_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/issues/events{/number}","events_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/events","assignees_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/assignees{/user}","branches_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/branches{/branch}","tags_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/tags","blobs_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/git/refs{/sha}","trees_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/statuses/{sha}","languages_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/languages","stargazers_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/stargazers","contributors_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/contributors","subscribers_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/subscribers","subscription_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/subscription","commits_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/commits{/sha}","git_commits_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/git/commits{/sha}","comments_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/comments{/number}","issue_comment_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/issues/comments{/number}","contents_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/contents/{+path}","compare_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/merges","archive_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/downloads","issues_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/issues{/number}","pulls_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/pulls{/number}","milestones_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/milestones{/number}","notifications_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/labels{/name}","releases_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/releases{/id}","deployments_url":"https://api.github.com/repos/CheckMateIO/active_model_serializers/deployments","created_at":"2015-11-19T23:09:29Z","updated_at":"2016-01-22T18:39:40Z","pushed_at":"2016-01-28T21:48:26Z","git_url":"git://github.com/CheckMateIO/active_model_serializers.git","ssh_url":"git@github.com:CheckMateIO/active_model_serializers.git","clone_url":"https://github.com/CheckMateIO/active_model_serializers.git","svn_url":"https://github.com/CheckMateIO/active_model_serializers","homepage":"","size":2304,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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":0,"default_branch":"master"}},"base":{"label":"rails-api:master","ref":"master","sha":"65093055d6b47c6a22a1f265c56a4f694eb80d78","user":{"login":"rails-api","id":2820360,"avatar_url":"https://avatars.githubusercontent.com/u/2820360?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-api","html_url":"https://github.com/rails-api","followers_url":"https://api.github.com/users/rails-api/followers","following_url":"https://api.github.com/users/rails-api/following{/other_user}","gists_url":"https://api.github.com/users/rails-api/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-api/subscriptions","organizations_url":"https://api.github.com/users/rails-api/orgs","repos_url":"https://api.github.com/users/rails-api/repos","events_url":"https://api.github.com/users/rails-api/events{/privacy}","received_events_url":"https://api.github.com/users/rails-api/received_events","type":"Organization","site_admin":false},"repo":{"id":2889230,"name":"active_model_serializers","full_name":"rails-api/active_model_serializers","owner":{"login":"rails-api","id":2820360,"avatar_url":"https://avatars.githubusercontent.com/u/2820360?v=3","gravatar_id":"","url":"https://api.github.com/users/rails-api","html_url":"https://github.com/rails-api","followers_url":"https://api.github.com/users/rails-api/followers","following_url":"https://api.github.com/users/rails-api/following{/other_user}","gists_url":"https://api.github.com/users/rails-api/gists{/gist_id}","starred_url":"https://api.github.com/users/rails-api/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails-api/subscriptions","organizations_url":"https://api.github.com/users/rails-api/orgs","repos_url":"https://api.github.com/users/rails-api/repos","events_url":"https://api.github.com/users/rails-api/events{/privacy}","received_events_url":"https://api.github.com/users/rails-api/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails-api/active_model_serializers","description":"ActiveModel::Serializer implementation and Rails hooks","fork":false,"url":"https://api.github.com/repos/rails-api/active_model_serializers","forks_url":"https://api.github.com/repos/rails-api/active_model_serializers/forks","keys_url":"https://api.github.com/repos/rails-api/active_model_serializers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails-api/active_model_serializers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails-api/active_model_serializers/teams","hooks_url":"https://api.github.com/repos/rails-api/active_model_serializers/hooks","issue_events_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/events{/number}","events_url":"https://api.github.com/repos/rails-api/active_model_serializers/events","assignees_url":"https://api.github.com/repos/rails-api/active_model_serializers/assignees{/user}","branches_url":"https://api.github.com/repos/rails-api/active_model_serializers/branches{/branch}","tags_url":"https://api.github.com/repos/rails-api/active_model_serializers/tags","blobs_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/{sha}","languages_url":"https://api.github.com/repos/rails-api/active_model_serializers/languages","stargazers_url":"https://api.github.com/repos/rails-api/active_model_serializers/stargazers","contributors_url":"https://api.github.com/repos/rails-api/active_model_serializers/contributors","subscribers_url":"https://api.github.com/repos/rails-api/active_model_serializers/subscribers","subscription_url":"https://api.github.com/repos/rails-api/active_model_serializers/subscription","commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails-api/active_model_serializers/contents/{+path}","compare_url":"https://api.github.com/repos/rails-api/active_model_serializers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails-api/active_model_serializers/merges","archive_url":"https://api.github.com/repos/rails-api/active_model_serializers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails-api/active_model_serializers/downloads","issues_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues{/number}","pulls_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls{/number}","milestones_url":"https://api.github.com/repos/rails-api/active_model_serializers/milestones{/number}","notifications_url":"https://api.github.com/repos/rails-api/active_model_serializers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/labels{/name}","releases_url":"https://api.github.com/repos/rails-api/active_model_serializers/releases{/id}","deployments_url":"https://api.github.com/repos/rails-api/active_model_serializers/deployments","created_at":"2011-12-01T06:39:26Z","updated_at":"2016-02-09T18:56:11Z","pushed_at":"2016-02-10T04:32:34Z","git_url":"git://github.com/rails-api/active_model_serializers.git","ssh_url":"git@github.com:rails-api/active_model_serializers.git","clone_url":"https://github.com/rails-api/active_model_serializers.git","svn_url":"https://github.com/rails-api/active_model_serializers","homepage":"","size":3841,"stargazers_count":3307,"watchers_count":3307,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":797,"mirror_url":null,"open_issues_count":204,"forks":797,"open_issues":204,"watchers":3307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1477"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/1477"},"issue":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1477"},"comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1477/comments"},"review_comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1477/comments"},"review_comment":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1477/commits"},"statuses":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/3a092c9b4b4e4c2ed9e568631689e53eac663c0c"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"bf4","id":142914,"avatar_url":"https://avatars.githubusercontent.com/u/142914?v=3","gravatar_id":"","url":"https://api.github.com/users/bf4","html_url":"https://github.com/bf4","followers_url":"https://api.github.com/users/bf4/followers","following_url":"https://api.github.com/users/bf4/following{/other_user}","gists_url":"https://api.github.com/users/bf4/gists{/gist_id}","starred_url":"https://api.github.com/users/bf4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bf4/subscriptions","organizations_url":"https://api.github.com/users/bf4/orgs","repos_url":"https://api.github.com/users/bf4/repos","events_url":"https://api.github.com/users/bf4/events{/privacy}","received_events_url":"https://api.github.com/users/bf4/received_events","type":"User","site_admin":false},"comments":3,"review_comments":3,"commits":1,"additions":1,"deletions":1,"changed_files":1}}