Sha256: caa2c2422078b5fb7d96cdd0fb1a2ba4d6b71f6e27bbfc35e37d305831915e55
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
RailsTutorial Chapter 10 Test-First Teaching Instructions ========================================================= These exercises are based on RailsTutorial but have been adapted to the user of [Devise](devise) as authentication solution. Among other things, Devise also provides controllers and views to edit the user, so that Chapter 10.1 of RailsTutorial (editing users) is being already taken care of. Similarly for 10.2 (access protecting of the edit page). Showing Users ------------- Chapter 10.3 covers implementing an index view of users with pagination and using partials. It also covers restricting access to the index page to signed-in users. Devise offers a facility similar to what RailsTutorials implements. RailsTutorial implements an `authenticate` method, while Devise's version is `authenticate_user!`. Either method redirects to the sign-in page if a given user isn't logged in. Destroying users with admin privilege ------------------------------------- Chapter 10.4 covers adding an admin flag to the users table, to identify privileged administrative users. Having such admin privileges, we go on to implement a `destroy` action for users which, however, is only available to admin users. What are the two things we have to protect? [devise]: https://github.com/plataformatec/devise "Devise on github"
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tft_rails-0.6.0 | lib/generators/chapter10/begin/instructions.md |