Guest User

Untitled

a guest
Jan 23rd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. when in bash model attributes are string by default
  2.  
  3. db/migrate/<file> check model before migrating
  4.  
  5. rails generate migration AddPriceToProducts
  6. Add<string>To<model name plural>
  7.  
  8. precision:<overall digits> scale:<digits to the right>
  9.  
  10. add to and remove can be done in terminal
  11.  
  12. AddStockToProducts stock
  13.  
  14. shorthand for bundle install is bundle
  15.  
  16. rake db:seed:dump
  17. saves current items to seeds.rb file
  18. rake db:seed
  19. updates our database with our current seed file if we dropped our db
  20.  
  21. the order after a dump should be
  22. rake db:create
  23. rake db:migrate
  24. rake db:seed
Add Comment
Please, Sign In to add comment