Update repository.rb

Fixed default_scope issue.