diff --git a/lib/travis/api/v3/models/repository.rb b/lib/travis/api/v3/models/repository.rb index 16b9467a..2c0756f5 100644 --- a/lib/travis/api/v3/models/repository.rb +++ b/lib/travis/api/v3/models/repository.rb @@ -6,7 +6,7 @@ module Travis::API::V3 has_many :builds, dependent: :delete_all, order: 'builds.id DESC'.freeze has_many :permissions, dependent: :delete_all has_many :users, through: :permissions - has_many :starred_repositories, through: :users + has_many :starred_repositories belongs_to :owner, polymorphic: true belongs_to :last_build, class_name: 'Travis::API::V3::Models::Build'.freeze