fixed scopes for rails 3