{"comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/26c3229fcbe4841d065cdac42fa3f98c?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"26c3229fcbe4841d065cdac42fa3f98c","url":"https://api.github.com/users/zhaoguobin","login":"zhaoguobin","id":521201},"position":null,"updated_at":"2011-11-17T14:44:17Z","commit_id":"389dd190a3667aed62ff5748fc5e4d7296559c7c","url":"https://api.github.com/repos/zhao-zhu/blog_1/comments/727673","line":null,"body":"1.新建一个```home``` controller带着一个```index``` action。\r\n\r\n```\r\nrails g controller home index\r\n```\r\n2.编辑```app/views/home/index.html```，添加一句：\r\n\r\n```\r\n<h1>Hello, Rails!</h1>\r\n```\r\n3.删除默认首页，执行命令：\r\n\r\n```\r\nrm public/index.html\r\n```\r\n\r\n\r\n4.编辑```config/routes.rb```，添加一句：\r\n\r\n```\r\nroot :to => \"home#index\"\r\n```\r\n\r\n使```home#index```成为首页\r\n","html_url":"https://github.com/zhao-zhu/blog_1/commit/389dd190a3#commitcomment-727673","id":727673,"path":null,"created_at":"2011-11-17T14:44:17Z"}}