{"action":"created","comment":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments/34266539","id":34266539,"diff_hunk":"@@ -0,0 +1,75 @@\n+# Getting Started\n+\n+## Installation\n+\n+### ActiveModel::Serializer is already included on Rails >= 5\n+\n+Add this line to your application's Gemfile:\n+\n+```\n+gem 'active_model_serializers'\n+```\n+\n+And then execute:\n+\n+```\n+$ bundle\n+```\n+\n+## Creating a Serializer\n+\n+The easiest way to create a new serializer is to generate a new resource, which\n+will generate a serializer at the same time:\n+\n+```\n+$ rails g resource post title:string body:string\n+```\n+\n+This will generate a serializer in `app/serializers/post_serializer.rb` for\n+your new model. You can also generate a serializer for an existing model with\n+the serializer generator:\n+\n+```\n+$ rails g serializer post\n+```\n+\n+The generated seralizer will contain basic `attributes` and\n+`has_many`/`has_one`/`belongs_to` declarations, based on the model. For example:\n+\n+```ruby\n+class PostSerializer < ActiveModel::Serializer\n+  attributes :title, :body\n+\n+  has_many :comments\n+  has_one :author\n+\n+  url :post","path":"docs/general/getting_started.md","position":46,"original_position":46,"commit_id":"d027942ba8b115ca86a21f39cb53e035d3e65e8a","original_commit_id":"d027942ba8b115ca86a21f39cb53e035d3e65e8a","user":{"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},"body":"what does `url` do here?  :)","created_at":"2015-07-09T15:19:09Z","updated_at":"2015-07-09T15:19:09Z","html_url":"https://github.com/rails-api/active_model_serializers/pull/994#discussion_r34266539","pull_request_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994","_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/comments/34266539"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/994#discussion_r34266539"},"pull_request":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994"}}},"pull_request":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994","id":39581965,"html_url":"https://github.com/rails-api/active_model_serializers/pull/994","diff_url":"https://github.com/rails-api/active_model_serializers/pull/994.diff","patch_url":"https://github.com/rails-api/active_model_serializers/pull/994.patch","issue_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/994","number":994,"state":"open","locked":false,"title":"Starting Docs structure","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":"We have being discussing about wiki and docs for a while.\r\nIt's time for us to help new and old AMS users to have a proper location to find general documentation and even 'how to' pages.\r\n\r\nWe decided to move forward with a ```docs/*```. This PR is the initial implementation of it.","created_at":"2015-07-09T13:21:07Z","updated_at":"2015-07-09T15:19:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbd1ab4c0e82205af9b1a88224b8c0b2f1c0134d","assignee":null,"milestone":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/milestones/5","html_url":"https://github.com/rails-api/active_model_serializers/milestones/0.10","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/milestones/5/labels","id":1011188,"number":5,"title":"0.10","description":"","creator":{"login":"kurko","id":70312,"avatar_url":"https://avatars.githubusercontent.com/u/70312?v=3","gravatar_id":"","url":"https://api.github.com/users/kurko","html_url":"https://github.com/kurko","followers_url":"https://api.github.com/users/kurko/followers","following_url":"https://api.github.com/users/kurko/following{/other_user}","gists_url":"https://api.github.com/users/kurko/gists{/gist_id}","starred_url":"https://api.github.com/users/kurko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kurko/subscriptions","organizations_url":"https://api.github.com/users/kurko/orgs","repos_url":"https://api.github.com/users/kurko/repos","events_url":"https://api.github.com/users/kurko/events{/privacy}","received_events_url":"https://api.github.com/users/kurko/received_events","type":"User","site_admin":false},"open_issues":13,"closed_issues":30,"state":"open","created_at":"2015-03-08T13:22:14Z","updated_at":"2015-07-09T13:21:07Z","due_on":"2015-07-31T03:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994/commits","review_comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994/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/994/comments","statuses_url":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/d027942ba8b115ca86a21f39cb53e035d3e65e8a","head":{"label":"joaomdmoura:master","ref":"master","sha":"d027942ba8b115ca86a21f39cb53e035d3e65e8a","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},"repo":{"id":25483024,"name":"active_model_serializers","full_name":"joaomdmoura/active_model_serializers","owner":{"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},"private":false,"html_url":"https://github.com/joaomdmoura/active_model_serializers","description":"ActiveModel::Serializer implementation and Rails hooks","fork":true,"url":"https://api.github.com/repos/joaomdmoura/active_model_serializers","forks_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/forks","keys_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/teams","hooks_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/hooks","issue_events_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/issues/events{/number}","events_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/events","assignees_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/assignees{/user}","branches_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/branches{/branch}","tags_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/tags","blobs_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/git/refs{/sha}","trees_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/statuses/{sha}","languages_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/languages","stargazers_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/stargazers","contributors_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/contributors","subscribers_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/subscribers","subscription_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/subscription","commits_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/commits{/sha}","git_commits_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/git/commits{/sha}","comments_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/comments{/number}","issue_comment_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/issues/comments{/number}","contents_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/contents/{+path}","compare_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/merges","archive_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/downloads","issues_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/issues{/number}","pulls_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/pulls{/number}","milestones_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/milestones{/number}","notifications_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/labels{/name}","releases_url":"https://api.github.com/repos/joaomdmoura/active_model_serializers/releases{/id}","created_at":"2014-10-20T19:31:19Z","updated_at":"2015-05-05T00:58:23Z","pushed_at":"2015-07-08T20:15:25Z","git_url":"git://github.com/joaomdmoura/active_model_serializers.git","ssh_url":"git@github.com:joaomdmoura/active_model_serializers.git","clone_url":"https://github.com/joaomdmoura/active_model_serializers.git","svn_url":"https://github.com/joaomdmoura/active_model_serializers","homepage":"","size":1914,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"0201f2dd2a3f0ed5daf54eabc33d7c6d7c224ed3","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-07-09T15:17:50Z","pushed_at":"2015-07-09T13:21:07Z","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":4964,"stargazers_count":2824,"watchers_count":2824,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":628,"mirror_url":null,"open_issues_count":129,"forks":628,"open_issues":129,"watchers":2824,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994"},"html":{"href":"https://github.com/rails-api/active_model_serializers/pull/994"},"issue":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/994"},"comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/issues/994/comments"},"review_comments":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/pulls/994/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/994/commits"},"statuses":{"href":"https://api.github.com/repos/rails-api/active_model_serializers/statuses/d027942ba8b115ca86a21f39cb53e035d3e65e8a"}}}}