{"action":"created","comment":{"url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/comments/42081245","id":42081245,"diff_hunk":"@@ -357,71 +353,71 @@ Action Viewで利用できるヘルパーの概要を以下に示します。[AP\n \n Active Recordオブジェクトに関連付けられるコンテナタグを出力します。\n \n-たとえば、`@post`が`Post`クラスのオブジェクトであれば、以下のように書くことができます。\n+以下の例で考察してみましょう。 `@article` is the object of `Article` class, you can do:\n \n ```html+erb\n-<%= content_tag_for(:tr, @post) do %>\n-  <td><%= @post.title %></td>\n+<%= content_tag_for(:tr, @article) do %>\n+  <td><%= @article.title %></td>\n <% end %>\n ```\n \n 上のコードによって以下のHTMLが生成されます。\n \n ```html\n-<tr id=\"post_1234\" class=\"post\">\n+<tr id=\"article_1234\" class=\"article\">\n   <td>Hello World!</td>\n </tr>\n ```\n \n-オプションのハッシュを追加することで、HTML属性を指定することもできます。例：\n+オプションのハッシュを追加することで、HTML属性を指定することもできます。以下に例を示します。\n \n ```html+erb\n-<%= content_tag_for(:tr, @post, class: \"frontpage\") do %>\n-  <td><%= @post.title %></td>\n+<%= content_tag_for(:tr, @article, class: \"frontpage\") do %>\n+  <td><%= @article.title %></td>\n <% end %>\n ```\n \n 上のコードによって以下のHTMLが生成されます。\n \n ```html\n-<tr id=\"post_1234\" class=\"post frontpage\">\n+<tr id=\"article_1234\" class=\"article frontpage\">\n   <td>Hello World!</td>\n </tr>\n ```\n \n-Active Recordオブジェクトのコレクションを渡すこともできます。このメソッドはオブジェクトをループで回してそれぞれについてコンテナを作成します。たとえば、`@posts`は`Post`オブジェクトを2つ含む配列であるとします。\n+Active Recordオブジェクトのコレクションを渡すこともできます。このメソッドはオブジェクトをループで回してそれぞれについてコンテナを作成しm以下の例で考察してみましょう。 `@articles` is an array of two `Article` objects:\n \n ```html+erb\n-<%= content_tag_for(:tr, @posts) do |post| %>\n-  <td><%= post.title %></td>\n+<%= content_tag_for(:tr, @articles) do |article| %>\n+  <td><%= article.title %></td>\n <% end %>\n ```\n \n 上のコードによって以下のHTMLが生成されます。\n \n ```html\n-<tr id=\"post_1234\" class=\"post\">\n+<tr id=\"article_1234\" class=\"article\">\n   <td>Hello World!</td>\n </tr>\n-<tr id=\"post_1235\" class=\"post\">\n+<tr id=\"article_1235\" class=\"article\">\n   <td>Ruby on Rails Rocks!</td>\n </tr>\n ```\n \n #### div_for\n \n-このメソッドは内部で`content_tag_for`を呼び出して`:div`をタグ名にしてくれる、便利なメソッドです。Active Recordオブジェクトを単体またはコレクションとして渡すことができます。例：\n+このメソッドは内部で`content_tag_for`を呼び出して`:div`をタグ名にしてくれる、便利なメソッドです。Active Recordオブジェクトを単体またはコレクションとして渡すことができます。以下に例を示します。\n \n ```html+erb\n-<%= div_for(@post, class: \"frontpage\") do %>\n-  <td><%= @post.title %></td>\n+<%= div_for(@article, class: \"frontpage\") do %>\n+  <td><%= @article.title %></td>\n <% end %>\n ```\n \n 上のコードによって以下のHTMLが生成されます。\n \n ```html\n-<div id=\"post_1234\" class=\"post frontpage\">\n+<div id=\"article_1234\" class=\"article frontpage\">","path":"guides/source/ja/action_view_overview.md","position":381,"original_position":381,"commit_id":"c3c44ad74c028667748e5b6e6ec9397cd0cbd901","original_commit_id":"c3c44ad74c028667748e5b6e6ec9397cd0cbd901","user":{"login":"hanachin","id":167012,"avatar_url":"https://avatars.githubusercontent.com/u/167012?v=3","gravatar_id":"","url":"https://api.github.com/users/hanachin","html_url":"https://github.com/hanachin","followers_url":"https://api.github.com/users/hanachin/followers","following_url":"https://api.github.com/users/hanachin/following{/other_user}","gists_url":"https://api.github.com/users/hanachin/gists{/gist_id}","starred_url":"https://api.github.com/users/hanachin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanachin/subscriptions","organizations_url":"https://api.github.com/users/hanachin/orgs","repos_url":"https://api.github.com/users/hanachin/repos","events_url":"https://api.github.com/users/hanachin/events{/privacy}","received_events_url":"https://api.github.com/users/hanachin/received_events","type":"User","site_admin":false},"body":"だいたいこの辺までpost -> articlesだな","created_at":"2015-10-15T03:55:22Z","updated_at":"2015-10-15T03:55:22Z","html_url":"https://github.com/tasslab/railsguides.jp/pull/26#discussion_r42081245","pull_request_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/comments/42081245"},"html":{"href":"https://github.com/tasslab/railsguides.jp/pull/26#discussion_r42081245"},"pull_request":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26","id":46355552,"html_url":"https://github.com/tasslab/railsguides.jp/pull/26","diff_url":"https://github.com/tasslab/railsguides.jp/pull/26.diff","patch_url":"https://github.com/tasslab/railsguides.jp/pull/26.patch","issue_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/26","number":26,"state":"open","locked":false,"title":"guides/source/ja/action_view_overview.md","user":{"login":"tasslab","id":13444331,"avatar_url":"https://avatars.githubusercontent.com/u/13444331?v=3","gravatar_id":"","url":"https://api.github.com/users/tasslab","html_url":"https://github.com/tasslab","followers_url":"https://api.github.com/users/tasslab/followers","following_url":"https://api.github.com/users/tasslab/following{/other_user}","gists_url":"https://api.github.com/users/tasslab/gists{/gist_id}","starred_url":"https://api.github.com/users/tasslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasslab/subscriptions","organizations_url":"https://api.github.com/users/tasslab/orgs","repos_url":"https://api.github.com/users/tasslab/repos","events_url":"https://api.github.com/users/tasslab/events{/privacy}","received_events_url":"https://api.github.com/users/tasslab/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-09-30T02:33:23Z","updated_at":"2015-10-15T03:55:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7f3987945039b15fcf2e223bdbdc1011a587c2f5","assignee":{"login":"hanachin","id":167012,"avatar_url":"https://avatars.githubusercontent.com/u/167012?v=3","gravatar_id":"","url":"https://api.github.com/users/hanachin","html_url":"https://github.com/hanachin","followers_url":"https://api.github.com/users/hanachin/followers","following_url":"https://api.github.com/users/hanachin/following{/other_user}","gists_url":"https://api.github.com/users/hanachin/gists{/gist_id}","starred_url":"https://api.github.com/users/hanachin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanachin/subscriptions","organizations_url":"https://api.github.com/users/hanachin/orgs","repos_url":"https://api.github.com/users/hanachin/repos","events_url":"https://api.github.com/users/hanachin/events{/privacy}","received_events_url":"https://api.github.com/users/hanachin/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26/commits","review_comments_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26/comments","review_comment_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/26/comments","statuses_url":"https://api.github.com/repos/tasslab/railsguides.jp/statuses/c3c44ad74c028667748e5b6e6ec9397cd0cbd901","head":{"label":"tasslab:2015-09-30-11-33-18","ref":"2015-09-30-11-33-18","sha":"c3c44ad74c028667748e5b6e6ec9397cd0cbd901","user":{"login":"tasslab","id":13444331,"avatar_url":"https://avatars.githubusercontent.com/u/13444331?v=3","gravatar_id":"","url":"https://api.github.com/users/tasslab","html_url":"https://github.com/tasslab","followers_url":"https://api.github.com/users/tasslab/followers","following_url":"https://api.github.com/users/tasslab/following{/other_user}","gists_url":"https://api.github.com/users/tasslab/gists{/gist_id}","starred_url":"https://api.github.com/users/tasslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasslab/subscriptions","organizations_url":"https://api.github.com/users/tasslab/orgs","repos_url":"https://api.github.com/users/tasslab/repos","events_url":"https://api.github.com/users/tasslab/events{/privacy}","received_events_url":"https://api.github.com/users/tasslab/received_events","type":"User","site_admin":false},"repo":{"id":39955756,"name":"railsguides.jp","full_name":"tasslab/railsguides.jp","owner":{"login":"tasslab","id":13444331,"avatar_url":"https://avatars.githubusercontent.com/u/13444331?v=3","gravatar_id":"","url":"https://api.github.com/users/tasslab","html_url":"https://github.com/tasslab","followers_url":"https://api.github.com/users/tasslab/followers","following_url":"https://api.github.com/users/tasslab/following{/other_user}","gists_url":"https://api.github.com/users/tasslab/gists{/gist_id}","starred_url":"https://api.github.com/users/tasslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasslab/subscriptions","organizations_url":"https://api.github.com/users/tasslab/orgs","repos_url":"https://api.github.com/users/tasslab/repos","events_url":"https://api.github.com/users/tasslab/events{/privacy}","received_events_url":"https://api.github.com/users/tasslab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tasslab/railsguides.jp","description":"Ruby on Rails Guides in Japanese (Railsガイド)","fork":true,"url":"https://api.github.com/repos/tasslab/railsguides.jp","forks_url":"https://api.github.com/repos/tasslab/railsguides.jp/forks","keys_url":"https://api.github.com/repos/tasslab/railsguides.jp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tasslab/railsguides.jp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tasslab/railsguides.jp/teams","hooks_url":"https://api.github.com/repos/tasslab/railsguides.jp/hooks","issue_events_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/events{/number}","events_url":"https://api.github.com/repos/tasslab/railsguides.jp/events","assignees_url":"https://api.github.com/repos/tasslab/railsguides.jp/assignees{/user}","branches_url":"https://api.github.com/repos/tasslab/railsguides.jp/branches{/branch}","tags_url":"https://api.github.com/repos/tasslab/railsguides.jp/tags","blobs_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/refs{/sha}","trees_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tasslab/railsguides.jp/statuses/{sha}","languages_url":"https://api.github.com/repos/tasslab/railsguides.jp/languages","stargazers_url":"https://api.github.com/repos/tasslab/railsguides.jp/stargazers","contributors_url":"https://api.github.com/repos/tasslab/railsguides.jp/contributors","subscribers_url":"https://api.github.com/repos/tasslab/railsguides.jp/subscribers","subscription_url":"https://api.github.com/repos/tasslab/railsguides.jp/subscription","commits_url":"https://api.github.com/repos/tasslab/railsguides.jp/commits{/sha}","git_commits_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/commits{/sha}","comments_url":"https://api.github.com/repos/tasslab/railsguides.jp/comments{/number}","issue_comment_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/comments{/number}","contents_url":"https://api.github.com/repos/tasslab/railsguides.jp/contents/{+path}","compare_url":"https://api.github.com/repos/tasslab/railsguides.jp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tasslab/railsguides.jp/merges","archive_url":"https://api.github.com/repos/tasslab/railsguides.jp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tasslab/railsguides.jp/downloads","issues_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues{/number}","pulls_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls{/number}","milestones_url":"https://api.github.com/repos/tasslab/railsguides.jp/milestones{/number}","notifications_url":"https://api.github.com/repos/tasslab/railsguides.jp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tasslab/railsguides.jp/labels{/name}","releases_url":"https://api.github.com/repos/tasslab/railsguides.jp/releases{/id}","created_at":"2015-07-30T14:46:20Z","updated_at":"2015-08-14T03:28:27Z","pushed_at":"2015-10-05T05:11:22Z","git_url":"git://github.com/tasslab/railsguides.jp.git","ssh_url":"git@github.com:tasslab/railsguides.jp.git","clone_url":"https://github.com/tasslab/railsguides.jp.git","svn_url":"https://github.com/tasslab/railsguides.jp","homepage":"http://railsguides.jp/","size":122716,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":1,"default_branch":"japanese"}},"base":{"label":"tasslab:japanese","ref":"japanese","sha":"c7ea7ee67bd2c9d827729c075a97f9db25444a4d","user":{"login":"tasslab","id":13444331,"avatar_url":"https://avatars.githubusercontent.com/u/13444331?v=3","gravatar_id":"","url":"https://api.github.com/users/tasslab","html_url":"https://github.com/tasslab","followers_url":"https://api.github.com/users/tasslab/followers","following_url":"https://api.github.com/users/tasslab/following{/other_user}","gists_url":"https://api.github.com/users/tasslab/gists{/gist_id}","starred_url":"https://api.github.com/users/tasslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasslab/subscriptions","organizations_url":"https://api.github.com/users/tasslab/orgs","repos_url":"https://api.github.com/users/tasslab/repos","events_url":"https://api.github.com/users/tasslab/events{/privacy}","received_events_url":"https://api.github.com/users/tasslab/received_events","type":"User","site_admin":false},"repo":{"id":39955756,"name":"railsguides.jp","full_name":"tasslab/railsguides.jp","owner":{"login":"tasslab","id":13444331,"avatar_url":"https://avatars.githubusercontent.com/u/13444331?v=3","gravatar_id":"","url":"https://api.github.com/users/tasslab","html_url":"https://github.com/tasslab","followers_url":"https://api.github.com/users/tasslab/followers","following_url":"https://api.github.com/users/tasslab/following{/other_user}","gists_url":"https://api.github.com/users/tasslab/gists{/gist_id}","starred_url":"https://api.github.com/users/tasslab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tasslab/subscriptions","organizations_url":"https://api.github.com/users/tasslab/orgs","repos_url":"https://api.github.com/users/tasslab/repos","events_url":"https://api.github.com/users/tasslab/events{/privacy}","received_events_url":"https://api.github.com/users/tasslab/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tasslab/railsguides.jp","description":"Ruby on Rails Guides in Japanese (Railsガイド)","fork":true,"url":"https://api.github.com/repos/tasslab/railsguides.jp","forks_url":"https://api.github.com/repos/tasslab/railsguides.jp/forks","keys_url":"https://api.github.com/repos/tasslab/railsguides.jp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tasslab/railsguides.jp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tasslab/railsguides.jp/teams","hooks_url":"https://api.github.com/repos/tasslab/railsguides.jp/hooks","issue_events_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/events{/number}","events_url":"https://api.github.com/repos/tasslab/railsguides.jp/events","assignees_url":"https://api.github.com/repos/tasslab/railsguides.jp/assignees{/user}","branches_url":"https://api.github.com/repos/tasslab/railsguides.jp/branches{/branch}","tags_url":"https://api.github.com/repos/tasslab/railsguides.jp/tags","blobs_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/refs{/sha}","trees_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tasslab/railsguides.jp/statuses/{sha}","languages_url":"https://api.github.com/repos/tasslab/railsguides.jp/languages","stargazers_url":"https://api.github.com/repos/tasslab/railsguides.jp/stargazers","contributors_url":"https://api.github.com/repos/tasslab/railsguides.jp/contributors","subscribers_url":"https://api.github.com/repos/tasslab/railsguides.jp/subscribers","subscription_url":"https://api.github.com/repos/tasslab/railsguides.jp/subscription","commits_url":"https://api.github.com/repos/tasslab/railsguides.jp/commits{/sha}","git_commits_url":"https://api.github.com/repos/tasslab/railsguides.jp/git/commits{/sha}","comments_url":"https://api.github.com/repos/tasslab/railsguides.jp/comments{/number}","issue_comment_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/comments{/number}","contents_url":"https://api.github.com/repos/tasslab/railsguides.jp/contents/{+path}","compare_url":"https://api.github.com/repos/tasslab/railsguides.jp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tasslab/railsguides.jp/merges","archive_url":"https://api.github.com/repos/tasslab/railsguides.jp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tasslab/railsguides.jp/downloads","issues_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues{/number}","pulls_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls{/number}","milestones_url":"https://api.github.com/repos/tasslab/railsguides.jp/milestones{/number}","notifications_url":"https://api.github.com/repos/tasslab/railsguides.jp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tasslab/railsguides.jp/labels{/name}","releases_url":"https://api.github.com/repos/tasslab/railsguides.jp/releases{/id}","created_at":"2015-07-30T14:46:20Z","updated_at":"2015-08-14T03:28:27Z","pushed_at":"2015-10-05T05:11:22Z","git_url":"git://github.com/tasslab/railsguides.jp.git","ssh_url":"git@github.com:tasslab/railsguides.jp.git","clone_url":"https://github.com/tasslab/railsguides.jp.git","svn_url":"https://github.com/tasslab/railsguides.jp","homepage":"http://railsguides.jp/","size":122716,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":9,"forks":0,"open_issues":9,"watchers":1,"default_branch":"japanese"}},"_links":{"self":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26"},"html":{"href":"https://github.com/tasslab/railsguides.jp/pull/26"},"issue":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/issues/26"},"comments":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/statuses/c3c44ad74c028667748e5b6e6ec9397cd0cbd901"}}}}