In this post, I try to explain scaffolding in rails shortly. Firstly, Let’s create rails project
Now, we created rails project and enter inside of project. We need to create scaffold,
- We create Information model, in this model
- Type of first_name and second_name is string.
- Type of date_time is date, this provide to create date.
- Type of city is boolean, this provide to create checkbox.
then we need to migrate for this reason,
Then, If you want change your home page(index.html), you should open in your app,
this path and write
root :to => 'information#index'
save and run