Hello everyone! I am currently learning ruby on rails for my project, and this is to help me learn better. I will explain each command below after listing it out!
to generate something in rails
rails generate migration AddXtoY
to generate a migration to add email to user table (strict convention of naming the migration … Read more)
rake db:migrate OR rails db:migrate
to migrate the database after modification (from migration files > db/migrations/* )
to reset the database and work on all migrations again (delete all then create)
Some Ruby On Rails 5 Conventions
- Migrations have to have the proper name (AddXtoY, etc)
- Partials have to be _name.html.erb (named in this order)
As of right now, this commands help me to see and do the basic stuff. I will edit this post and add on most stuff as time goes by. I’ll always be learning more!
Last updated 1 December