In this first lesson, we are going to run the Rails application generator and test to verify that everything works fine. To create the application, open your command prompt and go to the directory in which you want to create the application. Next, type this command to create your application.
In the previous guide, we created a Rails project. What did it exactly create for us? That's what we're going to see in this lesson. If you're already familiar with Rails, this is going to be more of a review lesson for you.
In this lesson, we are going to see how to use a scaffold generator. Scaffolds in Rails create the full set of CRUD functionality, including the: model, database table, controller, views, and routes.
Now that you've gone through the scaffold guide, let's play around with the application a little bit in the rails console.
In the last lesson we reviewed how to use the Rails console, during that guide we created a database record with empty values. Since a record with empty values makes no sense for our database table, the application should prevent the user from creating such a record. In this lesson, we're going to see how to implement data validations.
In this lesson, we are going to set the homepage of the application. This includes drawing the route and walking through how the route corresponds to the controller action and view template.
devCamp does not support ancient browsers.
Install a modern version for best experience.