In this movie, Kevin demonstrates his solution to the challenge assignment.
- Here's my solution to the challenge assignment.…This code is included in the exercise files…if you'd like to review it.…The first thing I did was I went in…to make edits to my admin user class.…I came down and I created a new custom method…for name which takes the first name…and the last name and puts a space between them.…I did it using string interpolation…but you could also do it using adding strings together…or by putting them into an array…and joining them together that way.…Next I added a name scope for sorted.…It uses a lambda and a query method for order…with the string last name, ascending,…comma, first name ascending.…
Once I had those done I was ready…to start on my controller.…I came to my command line.…I ran rails generate controller, admin users,…it's very important that it be plural…because we're working with a resource,…there's going to be more than one.…And I then thought about what templates…I was going to need to work with this.…And I decided on index, new, edit and delete.…Notice that show is normally there and is missing this time.…
- 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?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.