{"action":"opened","issue":{"url":"https://api.github.com/repos/yutokyokutyo/rebuild_sample_app/issues/12","repository_url":"https://api.github.com/repos/yutokyokutyo/rebuild_sample_app","labels_url":"https://api.github.com/repos/yutokyokutyo/rebuild_sample_app/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/yutokyokutyo/rebuild_sample_app/issues/12/comments","events_url":"https://api.github.com/repos/yutokyokutyo/rebuild_sample_app/issues/12/events","html_url":"https://github.com/yutokyokutyo/rebuild_sample_app/issues/12","id":220384539,"number":12,"title":"9章","user":{"login":"yutokyokutyo","id":7356977,"avatar_url":"https://avatars3.githubusercontent.com/u/7356977?v=3","gravatar_id":"","url":"https://api.github.com/users/yutokyokutyo","html_url":"https://github.com/yutokyokutyo","followers_url":"https://api.github.com/users/yutokyokutyo/followers","following_url":"https://api.github.com/users/yutokyokutyo/following{/other_user}","gists_url":"https://api.github.com/users/yutokyokutyo/gists{/gist_id}","starred_url":"https://api.github.com/users/yutokyokutyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutokyokutyo/subscriptions","organizations_url":"https://api.github.com/users/yutokyokutyo/orgs","repos_url":"https://api.github.com/users/yutokyokutyo/repos","events_url":"https://api.github.com/users/yutokyokutyo/events{/privacy}","received_events_url":"https://api.github.com/users/yutokyokutyo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-08T08:12:36Z","updated_at":"2017-04-08T08:12:36Z","closed_at":null,"body":"コンソールを開き、データベースにある最初のユーザーを変数userに代入してください。その後、そのuserオブジェクトからrememberメソッドがうまく動くかどうか確認してみましょう。また、remember_tokenとremember_digestの違いも確認してみてください。\r\n\r\n\r\n```\r\nirb(main):001:0> user = User.first\r\n  User Load (0.2ms)  SELECT  \"users\".* FROM \"users\" ORDER BY \"users\".\"id\" ASC LIMIT ?  [[\"LIMIT\", 1]]\r\n=> #<User id: 1, name: \"Yuto Kondo\", email: \"k.yuto.cre@gmail.com\", created_at: \"2017-04-01 08:11:37\", updated_at: \"2017-04-02 07:05:18\", password_digest: \"$2a$10$.Y0rWmKxkaw9jiUvWTKDdOTLKhdWVWbSRwSyeCY/N4m...\", remember_digest: nil>\r\nirb(main):002:0> user\r\n=> #<User id: 1, name: \"Yuto Kondo\", email: \"k.yuto.cre@gmail.com\", created_at: \"2017-04-01 08:11:37\", updated_at: \"2017-04-02 07:05:18\", password_digest: \"$2a$10$.Y0rWmKxkaw9jiUvWTKDdOTLKhdWVWbSRwSyeCY/N4m...\", remember_digest: nil>\r\nirb(main):003:0> user.remember\r\n   (0.1ms)  begin transaction\r\n  SQL (0.7ms)  UPDATE \"users\" SET \"updated_at\" = ?, \"remember_digest\" = ? WHERE \"users\".\"id\" = ?  [[\"updated_at\", 2017-04-08 08:09:02 UTC], [\"remember_digest\", \"$2a$10$utG5YZonO2SMh9hXkRKG2Oo/16Haba8OjVAXtMIU.P/IboeTlolvm\"], [\"id\", 1]]\r\n   (0.7ms)  commit transaction\r\n=> true\r\n```"}}
{"actor":{"display_login":"yutokyokutyo"}}