Create a login form and implement the controller actions for login and logout to handle user authentication in the simple_cms application.
- In the last movie we added has secure password…to our admin user model.…Now we want to create a login form…and a controller that can manage login and logout.…Let's start by going into the root of our rails application.…Let's generate that controller…with rails, generate, controller…and I'm gonna call it Access.…It's going to be the name of the controller.…And I want to generate two templates at the same time.…I want to tell it to generate…a template for menu and one for login.…I'm gonna hit return, let it do its work.…
And, now, let's switch over to our application…and let's start by going into the routes file…and make sure that we have the routes that we'll need.…I am going to go into config and then into routes.…You can see that went ahead…and it added a couple of routes for me.…These are just simple match routes.…I am going to move the root route up to the top.…I like to always keep that up at the top.…And then, after that, I'm gonna add a couple more routes.…The first of which is going to be the route…for processing the login.…
- Creating and configuring a new Ruby on Rails project
- Generating controllers and views
- Handling server requests
- Using different types of routes
- Rendering and viewing templates
- Generating migrations and models
- Creating, updating, and deleting records
- Finding records with queries
- Understanding relationship types
- Writing controllers for CRUD
- Working with layouts and helpers
- Managing application assets
- Building forms
- Validating data
- Authenticating users
Skill Level Beginner
1. What Is Ruby on Rails?
2. Get Started
3. Controllers, Views, and Dynamic Content
4. Databases and Migrations
5. Models and ActiveRecord
7. CRUD, REST, and Resourceful Routes
8. Controllers and CRUD
9. Layouts, Partials, and View Helpers
12. Data Validation
13. Controller Features
14. User Authentication
15. Improve the Simple CMS
Next steps1m 44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.