Fix scopes for rails4 support