Make scopes lambdas.

In preparation for rails 4.