use AR#where! instead of multi-line if-else-end conditions!
use a couple of scopes in Project class