Chapter 3 Flashcards
bundle update
update the gems to make sure the versions match
git mv README.rdoc README.md
changing the format from RDoc to Markdown using git
git commit -am
(-a) all changes, (-m) message
note*: make sure to commit everything before deploying or else you might get an error.
ok
generate a controller to handle static pages names “StaticPages” with a plan to make actions for a home page and help page
rails generate controller StaticPages home about
rails s
rails server shortcut
rails c
rails console shortcut
rails g
rails generate shortcut
bundle
bundle install shortcut
rake
rake test shortcut
when you add a branch, what is a good next step to do?
push to remote repository
git status
git add -A
git commit -m “add static pages controller”
git push -u origin static-pages
subsequent pushes can omit the arguments (git push)
why StaticPages generates static_pages_controller.rb
convention in rails to use snake case. (rails generator converts camelcase to snake using the underscore method)
you generated a controller; how do you undo it?
rails destroy controller StaticPages home help
undo rails generate model User name:string email:string
rails destroy model User
undo bundle exec rake db:migrate
bundle exec rake db:rollback