Change scopes to be inside a lambda as rails 4 requires