use lambda syntax on has_many
stop using deprecated ActiveRecord syntax
use newer active record syntax
use newer active record syntax
use the block form of default scope