The Rails console is one of the best ways to work with and test out models. It works similar to Ruby’s irb console, but also includes all of the project code and provides access to the database data.
- [Instructor] The Rails Console, is a powerful tool,…which allows us to work with our models directly,…without having to worry about having controllers and views.…In this movie, we're gonna learn how to use it.…The way that you launch the console, is from the…command line, you type rails, then console,…and then the environment that you want to enter.…That's going to be development when I'm developing…on my machine.…But it could also be production, or test,…or maybe you have another environment for staging or QA.…By default, it's going to assume that it's the…development environment.…So, most of the time in development,…you're just going to type rails console, or,…there's an even shorter shortcut which is just rails c.…
And that's what I find myself typing the most often.…If you have prior experience with Ruby,…then you may be familiar with the Ruby Console.…That is, irb, or Interactive ruby.…If you just type irb from your command line,…and you have Ruby installed,…you'll then get an Interactive Ruby.…It works a lot like a calculator, one plus one, returns two.…
- 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.