Handy Commands Flashcards
1
Q
What is the command which will generate a model with a model, migration file, views & more?
A
rails g model Article title:string body:text
2
Q
How do you view all the routes?
A
rails routes
3
Q
How do fire up the rails server on a different port?
A
rails s -p 3001
4
Q
How do you migrate your migration files into the database and would you migrate a specific file?
A
rails db:migrate
rails db:migrate:up VERSION=migration_file_number
5
Q
How would you drop create and migrate with one command?
A
rails db:reset