Rails4 compatibility

- Update scopes to use lambdas to meet the rails4 requirement that scopes respond to :call 
- Update activerecord syntax in tests