Learn to generate a model to be used in the application, which creates a migration file as well as several default placeholder templates. Write a migration file that defines the users table and its columns. Learn about the different column types and options that can be included.
- [Instructor] In the last movie, we saw…how to generate migrations.…In this movie, we're going to learn to generate models…along with their migrations.…The way that we're going to do that…is using the Rails generate command,…but this time, we're going to specify…that we want to generate a model,…and we're going to provide the name…of the model in Camel case.…Just like we did with the migration,…but this time, we're telling Rails that it's a model,…not just a migration on its own.…To demonstrate, we're going to create…the user model that we're going to use…in our simple CMS application.…The way that we will do that is with Rails generate model,…and then, in Camel case,…the name of the model we want to create,…and it's going to be singular,…it's very important.…
Let's return.…It's going to create a few files for us.…Notice that it created a migration for us,…it gave it a timestamp, and you will notice…that the timestamp is different…than the timestamp we used previously,…and it named it for us, create underscore users.…
- 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.