Ruby学习笔记7: 添加身份验证(adding Authentication)
我们已经完成了Category & Product页面内容的增删改查,再加入一个身份验证即可成为一个较完整的Rails App了。本文就来完成这个任务。 We now need to give users the ability to sign up for the app so that they can do things like purchase products or leave reviews. To do this, we'll add a user authentication system to the app.看下图: 1. install a gem called Devise. Earlier, we learned about bundler and how it sets up our gems. To add authentication, we'll install a gem called Devise. We've gone ahead and added Devise for you in your Gemfile.
…