{"action":"created","comment":{"url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/comments/41615602","id":41615602,"diff_hunk":"@@ -756,26 +819,43 @@ private\n \n 何やら目新しいコードが追加されています。ここでは、`@article.errors.any?`でエラーが発生しているかどうかをチェックしています。そしてエラーの場合は`@article.errors.full_messages`でエラーメッセージを全文表示します。\n \n-`pluralize`は、数値を受け取ってそれに応じて英語の「単数形/複数形」活用を行ってくれるRailsのヘルパーメソッドです。数値が1より大きい場合は、引数の文字列を自動的に複数形に変更します(訳注:`pluralize`はたいていの不規則活用にも対応しています)。\n+`pluralize`は、数値を受け取ってそれに応じて英語の「単数形/複数形」活用を行ってくれるRailsのヘルパーメソッドです。数値が1より大きい場合は、引数の文字列を自動的に複数形に変更します(訳注:`pluralize`はperson->peopleなどおおく不規則活用にも対応しています)。\n \n `ArticlesController`に`@article = Article.new`を追加した理由は、そうしないとビューで受け取る`@article`が`nil`になってしまい、`@article.errors.any?`を呼び出すところでエラーになってしまうためです。Articleのインスタンス作成に成功したときは@articleが`nil`にならないようにしておきたいわけです。\n \n TIP: Railsでは、エラーメッセージを含むフィールドは自動的に`field_with_errors`クラスを持つdivタグで囲まれます。これを利用して、エラーメッセージをもっと目立たせるようにcssルールを定義しても構いません。\n \n-これで、<http://localhost:3000/articles/new>のフォームで新しい記事を保存する時にタイトルがなかった場合に、適切なエラーメッセージが表示されるようになりました。\n+Now you'll get a nice error message when saving an article without title when\n+you attempt to do just that on the new article form\n+<http://localhost:3000/articles/new>:\n \n ![エラーが表示されているフォーム](images/getting_started/form_with_errors.png)\n \n ### 記事を更新する\n \n-ここまでで、CRUDのうちCとRを実現しました。今度はUの部分、つまり記事の更新を実装してみましょう。\n+ここまでで、CRUDのうち. Now let's focus on the \"U\" part, updating articles.\n \n-最初に、`ArticlesController`に`edit`アクションを追加しましょう。\n+The first step we'll take is adding an `edit` action to the `ArticlesController`,\n+generally between the `new` and `create` actions, as shown:","path":"guides/source/ja/getting_started.md","position":609,"original_position":609,"commit_id":"c436c8842f3bf380ed3548aad7154635eb5ca14f","original_commit_id":"c436c8842f3bf380ed3548aad7154635eb5ca14f","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":"原文追加","created_at":"2015-10-09T10:09:19Z","updated_at":"2015-10-09T10:09:19Z","html_url":"https://github.com/tasslab/railsguides.jp/pull/50#discussion_r41615602","pull_request_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/comments/41615602"},"html":{"href":"https://github.com/tasslab/railsguides.jp/pull/50#discussion_r41615602"},"pull_request":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/50","id":46744836,"html_url":"https://github.com/tasslab/railsguides.jp/pull/50","diff_url":"https://github.com/tasslab/railsguides.jp/pull/50.diff","patch_url":"https://github.com/tasslab/railsguides.jp/pull/50.patch","issue_url":"https://api.github.com/repos/tasslab/railsguides.jp/issues/50","number":50,"state":"open","locked":false,"title":"getting_started.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-10-05T05:07:57Z","updated_at":"2015-10-09T10:09:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"93123f66f3556462425beb5c38d0f0c4729a3811","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/50/commits","review_comments_url":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/50/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/50/comments","statuses_url":"https://api.github.com/repos/tasslab/railsguides.jp/statuses/c436c8842f3bf380ed3548aad7154635eb5ca14f","head":{"label":"tasslab:2015-10-05-14-07-52","ref":"2015-10-05-14-07-52","sha":"c436c8842f3bf380ed3548aad7154635eb5ca14f","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":41,"forks":0,"open_issues":41,"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":41,"forks":0,"open_issues":41,"watchers":1,"default_branch":"japanese"}},"_links":{"self":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/50"},"html":{"href":"https://github.com/tasslab/railsguides.jp/pull/50"},"issue":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/issues/50"},"comments":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/pulls/50/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/50/commits"},"statuses":{"href":"https://api.github.com/repos/tasslab/railsguides.jp/statuses/c436c8842f3bf380ed3548aad7154635eb5ca14f"}}}}