From the course: Ruby on Rails 5 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Read action: Index - Ruby on Rails Tutorial
From the course: Ruby on Rails 5 Essential Training
Read action: Index
- [Narrator] In this chapter, we will learn to implement the basics of CRUD in our controllers and in our views. In the last chapter, we already created a subjects controller and we set up the routes, the actions and the views that we'll need for all eight parts of basic CRUD. Now, we're going to start by learning to implement the index action. Reading records from the database is usually handled by two standard Rails actions: Index and show. Index displays a list of records, while show displays a detailed view for a single record. The two actions work together as a common application design pattern. The application displays a list of items, the user clicks a link for one of those items, then the application shows the user a detail page for that item. The user reviews the details, and then clicks a link to go back to the main list. Even if you've never put these exact terms to it before, I'm sure you're familiar with the concept from other websites. Let's see how we can add the index…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Read action: Index6m 31s
-
(Locked)
Read action: Show5m 22s
-
(Locked)
Form basics5m 13s
-
(Locked)
Create action: New4m 54s
-
(Locked)
Create action: Create5m 27s
-
(Locked)
Strong parameters6m 33s
-
(Locked)
Update actions: Edit/update7m 53s
-
(Locked)
Delete actions: Delete/destroy7m 11s
-
(Locked)
Flash hash7m 28s
-
Challenge: Pages and sections CRUD1m 43s
-
(Locked)
Solution: Pages and sections CRUD7m 38s
-
(Locked)
-
-
-
-
-
-
-
-