{"action":"created","comment":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments/36592591","id":36592591,"diff_hunk":"@@ -2,12 +2,22 @@ module ActiveModel\n   class Serializer\n     class ArraySerializer\n       NoSerializerError = Class.new(StandardError)\n+\n+      extend ActiveSupport::Autoload\n+\n+      autoload :Configuration\n+      autoload :KeyFormat\n+\n       include Enumerable\n+      include Serializer::Configuration\n+      include Serializer::KeyFormat\n+","path":"lib/active_model/serializer/array_serializer.rb","position":13,"original_position":13,"commit_id":"da83ae6033d3e8815de518e7adaa5c9b28eda15d","original_commit_id":"da83ae6033d3e8815de518e7adaa5c9b28eda15d","user":{"login":"joaomdmoura","id":667063,"avatar_url":"https://avatars.githubusercontent.com/u/667063?v=3","gravatar_id":"","url":"https://api.github.com/users/joaomdmoura","html_url":"https://github.com/joaomdmoura","followers_url":"https://api.github.com/users/joaomdmoura/followers","following_url":"https://api.github.com/users/joaomdmoura/following{/other_user}","gists_url":"https://api.github.com/users/joaomdmoura/gists{/gist_id}","starred_url":"https://api.github.com/users/joaomdmoura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaomdmoura/subscriptions","organizations_url":"https://api.github.com/users/joaomdmoura/orgs","repos_url":"https://api.github.com/users/joaomdmoura/repos","events_url":"https://api.github.com/users/joaomdmoura/events{/privacy}","received_events_url":"https://api.github.com/users/joaomdmoura/received_events","type":"User","site_admin":false},"body":"Same thing related to `autoload` here","created_at":"2015-08-09T19:25:11Z","updated_at":"2015-08-09T19:25:11Z","html_url":"https://github.com/rails-api/active_model_serializers/pull/1029#discussion_r36592591","pull_request_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029","_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments/36592591"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/1029#discussion_r36592591"},"pull_request":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029"}}},"pull_request":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029","id":41324281,"html_url":"https://github.com/rails-api/active_model_serializers/pull/1029","diff_url":"https://github.com/rails-api/active_model_serializers/pull/1029.diff","patch_url":"https://github.com/rails-api/active_model_serializers/pull/1029.patch","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1029","number":1029,"state":"open","locked":false,"title":"Allow Key Format to Be Overridden and Have Sensible Defaults","user":{"login":"jfelchner","id":285582,"avatar_url":"https://avatars.githubusercontent.com/u/285582?v=3","gravatar_id":"","url":"https://api.github.com/users/jfelchner","html_url":"https://github.com/jfelchner","followers_url":"https://api.github.com/users/jfelchner/followers","following_url":"https://api.github.com/users/jfelchner/following{/other_user}","gists_url":"https://api.github.com/users/jfelchner/gists{/gist_id}","starred_url":"https://api.github.com/users/jfelchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfelchner/subscriptions","organizations_url":"https://api.github.com/users/jfelchner/orgs","repos_url":"https://api.github.com/users/jfelchner/repos","events_url":"https://api.github.com/users/jfelchner/events{/privacy}","received_events_url":"https://api.github.com/users/jfelchner/received_events","type":"User","site_admin":false},"body":"### Overriding the Key Format\r\n\r\nYou can specify that serializers use a different style for the format of the\r\nkeys that are sent over. This can be done at the config, class or instance\r\nlevel.\r\n\r\n```ruby\r\n# Global\r\nActiveModel::Serializer.config.key_format = :lower_camel\r\n\r\n# Per Serializer\r\nclass BlogLowerCamelSerializer < ActiveModel::Serializer\r\n  key_format :lower_camel\r\nend\r\n\r\n# Per Instance\r\nBlogSerializer.new(object, key_format: :lower_camel)\r\n```\r\n\r\n#### Currently Supported Key Formats ####\r\n\r\n* `:unaltered`\r\n* `:lower_camel`\r\n* `:underscore`\r\n* `:dasherize`\r\n\r\nThe default key format will be set depending on the adapter that you specify.\r\nFor example, the JSON adapter defaults to `lower_camel` whereas the JSON API\r\nadapter defaults to `dasherize`.  Any other adapter will default to `unaltered`.\r\n\r\nReferences: #534, https://github.com/emberjs/data/issues/3455\r\nCloses: #974 \r\n\r\nMerry Christmas in July everyone. :grinning: :christmas_tree: :santa: \r\n","created_at":"2015-07-31T09:56:31Z","updated_at":"2015-08-09T19:25:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa8e248aeffd1cb55b0c00cc29c09585ba7c84c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029/commits","review_comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029/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/1029/comments","statuses_url":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/da83ae6033d3e8815de518e7adaa5c9b28eda15d","head":{"label":"jfelchner:feature/default-json-api-to-dasherized-keys","ref":"feature/default-json-api-to-dasherized-keys","sha":"da83ae6033d3e8815de518e7adaa5c9b28eda15d","user":{"login":"jfelchner","id":285582,"avatar_url":"https://avatars.githubusercontent.com/u/285582?v=3","gravatar_id":"","url":"https://api.github.com/users/jfelchner","html_url":"https://github.com/jfelchner","followers_url":"https://api.github.com/users/jfelchner/followers","following_url":"https://api.github.com/users/jfelchner/following{/other_user}","gists_url":"https://api.github.com/users/jfelchner/gists{/gist_id}","starred_url":"https://api.github.com/users/jfelchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfelchner/subscriptions","organizations_url":"https://api.github.com/users/jfelchner/orgs","repos_url":"https://api.github.com/users/jfelchner/repos","events_url":"https://api.github.com/users/jfelchner/events{/privacy}","received_events_url":"https://api.github.com/users/jfelchner/received_events","type":"User","site_admin":false},"repo":{"id":39928606,"name":"active_model_serializers","full_name":"jfelchner/active_model_serializers","owner":{"login":"jfelchner","id":285582,"avatar_url":"https://avatars.githubusercontent.com/u/285582?v=3","gravatar_id":"","url":"https://api.github.com/users/jfelchner","html_url":"https://github.com/jfelchner","followers_url":"https://api.github.com/users/jfelchner/followers","following_url":"https://api.github.com/users/jfelchner/following{/other_user}","gists_url":"https://api.github.com/users/jfelchner/gists{/gist_id}","starred_url":"https://api.github.com/users/jfelchner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfelchner/subscriptions","organizations_url":"https://api.github.com/users/jfelchner/orgs","repos_url":"https://api.github.com/users/jfelchner/repos","events_url":"https://api.github.com/users/jfelchner/events{/privacy}","received_events_url":"https://api.github.com/users/jfelchner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jfelchner/active_model_serializers","description":"ActiveModel::Serializer implementation and Rails hooks","fork":true,"url":"https://api.github.com/repos/jfelchner/active_model_serializers","forks_url":"https://api.github.com/repos/jfelchner/active_model_serializers/forks","keys_url":"https://api.github.com/repos/jfelchner/active_model_serializers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jfelchner/active_model_serializers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jfelchner/active_model_serializers/teams","hooks_url":"https://api.github.com/repos/jfelchner/active_model_serializers/hooks","issue_events_url":"https://api.github.com/repos/jfelchner/active_model_serializers/issues/events{/number}","events_url":"https://api.github.com/repos/jfelchner/active_model_serializers/events","assignees_url":"https://api.github.com/repos/jfelchner/active_model_serializers/assignees{/user}","branches_url":"https://api.github.com/repos/jfelchner/active_model_serializers/branches{/branch}","tags_url":"https://api.github.com/repos/jfelchner/active_model_serializers/tags","blobs_url":"https://api.github.com/repos/jfelchner/active_model_serializers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jfelchner/active_model_serializers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jfelchner/active_model_serializers/git/refs{/sha}","trees_url":"https://api.github.com/repos/jfelchner/active_model_serializers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jfelchner/active_model_serializers/statuses/{sha}","languages_url":"https://api.github.com/repos/jfelchner/active_model_serializers/languages","stargazers_url":"https://api.github.com/repos/jfelchner/active_model_serializers/stargazers","contributors_url":"https://api.github.com/repos/jfelchner/active_model_serializers/contributors","subscribers_url":"https://api.github.com/repos/jfelchner/active_model_serializers/subscribers","subscription_url":"https://api.github.com/repos/jfelchner/active_model_serializers/subscription","commits_url":"https://api.github.com/repos/jfelchner/active_model_serializers/commits{/sha}","git_commits_url":"https://api.github.com/repos/jfelchner/active_model_serializers/git/commits{/sha}","comments_url":"https://api.github.com/repos/jfelchner/active_model_serializers/comments{/number}","issue_comment_url":"https://api.github.com/repos/jfelchner/active_model_serializers/issues/comments{/number}","contents_url":"https://api.github.com/repos/jfelchner/active_model_serializers/contents/{+path}","compare_url":"https://api.github.com/repos/jfelchner/active_model_serializers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jfelchner/active_model_serializers/merges","archive_url":"https://api.github.com/repos/jfelchner/active_model_serializers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jfelchner/active_model_serializers/downloads","issues_url":"https://api.github.com/repos/jfelchner/active_model_serializers/issues{/number}","pulls_url":"https://api.github.com/repos/jfelchner/active_model_serializers/pulls{/number}","milestones_url":"https://api.github.com/repos/jfelchner/active_model_serializers/milestones{/number}","notifications_url":"https://api.github.com/repos/jfelchner/active_model_serializers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jfelchner/active_model_serializers/labels{/name}","releases_url":"https://api.github.com/repos/jfelchner/active_model_serializers/releases{/id}","created_at":"2015-07-30T03:08:46Z","updated_at":"2015-07-30T03:08:46Z","pushed_at":"2015-08-04T01:13:37Z","git_url":"git://github.com/jfelchner/active_model_serializers.git","ssh_url":"git@github.com:jfelchner/active_model_serializers.git","clone_url":"https://github.com/jfelchner/active_model_serializers.git","svn_url":"https://github.com/jfelchner/active_model_serializers","homepage":"","size":1573,"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":"c4af610ed2eac7025ff32ed3984233d313c111da","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}","created_at":"2011-12-01T06:39:26Z","updated_at":"2015-08-07T14:40:16Z","pushed_at":"2015-08-08T20:30:55Z","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":5571,"stargazers_count":2883,"watchers_count":2883,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":654,"mirror_url":null,"open_issues_count":141,"forks":654,"open_issues":141,"watchers":2883,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/1029"},"issue":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1029"},"comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1029/comments"},"review_comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/1029/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/1029/commits"},"statuses":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/da83ae6033d3e8815de518e7adaa5c9b28eda15d"}}}}