https://medium.com/@PaulWritesCode/ruby-on-rails-with-visual-studio-code-bc5681a2c098\
heroku keys:add
: useful command to add SSH Keys to heroku
Using ASDF to manage postgres you have this commands some commands:
createdb <name_db>
dropdb <name_db>
pg_ctl <commando>
In the root of project's folder you create a .vscode
folder with tasks.json
and copy the code down below:
{
"version":"2.0.0",
"tasks":[
{
"taskName":"beautify",
"type":"shell",
"command":"htmlbeautifier ${relativeFile}",
"problemMatcher":[
],
"presentation":{
"reveal":"never"
}
},
{
"taskName":"rubocop",
"type":"shell",
"command":"rubocop --auto-correct ${relativeFile}",
"problemMatcher":[
],
"presentation":{
"reveal":"never"
}
},
{
"taskName":"rspec",
"type":"shell",
"command":"bundle exec rspec",
"problemMatcher":[
],
"presentation":{
"reveal":"always"
}
},
{
"taskName":"rspec file",
"type":"shell",
"command":"bundle exec rspec ${relativeFile}",
"problemMatcher":[
],
"presentation":{
"reveal":"always"
}
},
{
"taskName":"rails c",
"type":"shell",
"command":"bundle exec rails console",
"problemMatcher":[
],
"presentation":{
"reveal":"always"
}
},
{
"taskName":"rails s",
"type":"shell",
"command":"bundle exec rails server",
"problemMatcher":[
],
"presentation":{
"reveal":"always"
}
},
{
"taskName":"cap production deploy",
"type":"shell",
"command":"cap production deploy",
"problemMatcher":[
],
"presentation":{
"reveal":"always"
}
},
{
"taskName":"configure",
"type":"shell",
"command":"gem install ruby-debug-ide:0.6.0 debase:0.2.2.beta10 rcodetools rubocop fastri htmlbeautifier --no-ri --no-rdoc",
"problemMatcher":[
],
"presentation":{
"reveal":"always"
}
}
]
}
- Model Name -> Singular, First letter Uppercase
- Table Name -> Plural, lower case of model name
- Model file name -> All lowercase but singular,
article.rb
- Controller name -> plural of model so
articles_controller.rb