In this movie, Kevin demonstrates his solution to the challenge assignment.
- [Narrator] Here's my solution…to the challenge assignment.…Remember, this code is included…in the course exercise files.…The first thing that I did,…was I made sure that I was in the root…of mt rails application, and I ran the command…rails generate controller…and then the name of the controller…in CamelCase, so capital P, Pages, plural…and then, the names of the templates…that I want it to generate for me,…index, show, new, edit, and delete.…Once it had done that for me,…I did the same thing for Sections, so,…rails generate controller Sections…index show new edit delete…Then I went into my routes file…and I removed the default match routes…that it created for me,…because I wanted to use resourceful routing instead.…
So, I removed those and instead put in…resources :pages and resources :sections.…Remember that by default,…that adds seven of the basic CRUD actions to it.…It doesn't add delete,…so we have to add a member route for delete…if we also want to have a delete page.…So I did that for both of those.…Now, it wasn't strictly specified,…
- 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.