Skip to content

Helpful Commands

Shen Yang edited this page Oct 1, 2021 · 50 revisions

Terminal Commands

rails c open the rails console
rails s start the app locally
rails routes list all website routes
rake db:reset reset your test data
yarn test lint javascript and run jest
heroku run rails c --app casa-production requires heroku access
bundle exec rpsec <PATH> run all tests in a file or all tests in a directory

run cypress tests
bundle exec rails server -b 0.0.0.0 -p 4040
npm run test:cypress --exit-code 0

Console Commands

SupervisorMailer.weekly_digest(Supervisor.first).deliver_now send a supervisor weekly digest email(opens in new tab)
ActiveStorage::Attachment.all.each { |attachment| attachment.purge } delete all active storage attachments
casa_org.court_report_template.attach(io: File.new(PATH TO DOCUMENT), filename: "document.docx") set the court report template for casa_org

URLs

http://localhost:3000/rails/mailers An index of examples of every type of email

Clone this wiki locally