Last active
June 16, 2020 17:44
-
-
Save Godoy/4538424 to your computer and use it in GitHub Desktop.
Desfazendo coisas no Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rails generate controller Noticias titulo | |
$ rails destroy controller Noticias titulo | |
$ rails generate model Noticia titulo:string | |
$ rails destroy model Noticia | |
$ rake db:migrate | |
$ rake db:rollback | |
$ rake db:migrate VERSION=0 #defaz todas as migrations, deixa o banco "limpo" | |
$ rake db:migrate:reset #reseta todo o banco, perdendo todos os registros, e já executa novamente as todas as migrations | |
$ bundle exec rake assets:clobber(Removes all compiled assets) | |
$ bundle exec rake assets:precompile (Precompiled assets again) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment