updated scopes to adhere to rails 4