Skip to content

Instantly share code, notes, and snippets.

@hadrienblanc
Created October 17, 2018 15:46
Show Gist options
  • Save hadrienblanc/65a30efbedab2cf4e3f44f413c4c0b3f to your computer and use it in GitHub Desktop.
Save hadrienblanc/65a30efbedab2cf4e3f44f413c4c0b3f to your computer and use it in GitHub Desktop.
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done. And your view can only know about one instance variable.

You can break these rules if you can talk your pair into agreeing with you.

source : Sandi Metz' Rules For Developers from thoughtbot blog (https://robots.thoughtbot.com/sandi-metz-rules-for-developers)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment