Skip to content

Backend Practices

Julia Nguyen edited this page Jul 22, 2018 · 9 revisions

File and Folder Structure

Our backend is in Ruby on Rails and follows the typical file and folder structure of scaffolded apps. To learn more read the official Getting Started with Rails guide.

Code Quality

  • We use 2 space indentation.
  • We use snakecase for Ruby files and id/class names in HTML.
  • We use single quotes for Ruby files.
  • We follow Airbnb's Ruby style guide

Rubocop

Rubocop is a Ruby static code analyzer that we also integrate in Codeclimate, an automated code review we run when pull requests are made.

rubocop

Schema Documentation

If you add or modify a model, please run annotate to update the schema comments and rake db:drop db:create db:migrate; rake db:schema:load to update db/schema.rb.

Automated Testing

Please see our Automated Testing document, specifically the backend document.

Clone this wiki locally