{"action":"created","issue":{"url":"https://api.github.com/repos/takuminnnn/sample_app/issues/9","labels_url":"https://api.github.com/repos/takuminnnn/sample_app/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/takuminnnn/sample_app/issues/9/comments","events_url":"https://api.github.com/repos/takuminnnn/sample_app/issues/9/events","html_url":"https://github.com/takuminnnn/sample_app/issues/9","id":88639763,"number":9,"title":"各Chapterのまとめ","user":{"login":"takuminnnn","id":2803040,"avatar_url":"https://avatars.githubusercontent.com/u/2803040?v=3","gravatar_id":"","url":"https://api.github.com/users/takuminnnn","html_url":"https://github.com/takuminnnn","followers_url":"https://api.github.com/users/takuminnnn/followers","following_url":"https://api.github.com/users/takuminnnn/following{/other_user}","gists_url":"https://api.github.com/users/takuminnnn/gists{/gist_id}","starred_url":"https://api.github.com/users/takuminnnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuminnnn/subscriptions","organizations_url":"https://api.github.com/users/takuminnnn/orgs","repos_url":"https://api.github.com/users/takuminnnn/repos","events_url":"https://api.github.com/users/takuminnnn/events{/privacy}","received_events_url":"https://api.github.com/users/takuminnnn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-16T07:01:49Z","updated_at":"2015-06-16T07:19:41Z","closed_at":null,"body":"Chapterごとに振り返りというかまとめを書いてくissue"},"comment":{"url":"https://api.github.com/repos/takuminnnn/sample_app/issues/comments/112318291","html_url":"https://github.com/takuminnnn/sample_app/issues/9#issuecomment-112318291","issue_url":"https://api.github.com/repos/takuminnnn/sample_app/issues/9","id":112318291,"user":{"login":"takuminnnn","id":2803040,"avatar_url":"https://avatars.githubusercontent.com/u/2803040?v=3","gravatar_id":"","url":"https://api.github.com/users/takuminnnn","html_url":"https://github.com/takuminnnn","followers_url":"https://api.github.com/users/takuminnnn/followers","following_url":"https://api.github.com/users/takuminnnn/following{/other_user}","gists_url":"https://api.github.com/users/takuminnnn/gists{/gist_id}","starred_url":"https://api.github.com/users/takuminnnn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/takuminnnn/subscriptions","organizations_url":"https://api.github.com/users/takuminnnn/orgs","repos_url":"https://api.github.com/users/takuminnnn/repos","events_url":"https://api.github.com/users/takuminnnn/events{/privacy}","received_events_url":"https://api.github.com/users/takuminnnn/received_events","type":"User","site_admin":false},"created_at":"2015-06-16T07:19:41Z","updated_at":"2015-06-16T07:19:41Z","body":"# Chapter6 - Userモデルをつくる\r\n\r\n- `rails g model Hoge name: string` みたいな形でモデルを生成\r\n- `rails c -s` で生成したモデルを試すことができる\r\n  - `c`はconsole、`s` はsandboxの略\r\n  - sオプションをつけているとdatabaseに変更が加えられても終了時にロールバックしてなかったことにできる\r\n- モデルのattrに様々な制約を課すことができる(validation)\r\n  - `presence`, `lentgh`, `format`, `uniqueness` and more...\r\n- 正規表現にはRubularが便利だよ(よく使ってたなあ)\r\n- Gem `bcrypt` を使ってパスワードをハッシュ化\r\n  - このgemが提供する `authenticate` メソッドでtrueだけを返したい(userレコードはいらない)場合は先頭に `!!` をつける"}}