Nithin Bekal Posts About

Sandi Metz Rules

In a Rails project:

  • classes can be no longer than 100 LOC
  • methods can be no longer than 5 lines
  • pass no more than 4 params to a method
  • controllers can instantiate only one object

You can only break these rules if you can convince your pair or reviewer that breaking the rule makes sense.