Rails4 compatibility

- Use lambda in scopes, for rails4 compatibility (scopes must respond to 'call')
- Fix specs treating AR errors as a hash