diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-29 13:14:29 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-03-29 13:14:29 +0300 |
commit | a222486c3e06d02e93704aa8440299cb4a677cef (patch) | |
tree | 5d027be5b540f10eb14a39fdbb67b07384c7386e /app | |
parent | 95faf5f5b7268ea1750f3a764cd0537b3e0d1e25 (diff) |
Rename method for checking tags in container repository
This is important because method `empty?` is triggered when validation
happens, and we don't want to make API request to registry when record
is validated.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/container_repository.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/models/container_repository.rb b/app/models/container_repository.rb index 149d65ddbff..b128069ca0e 100644 --- a/app/models/container_repository.rb +++ b/app/models/container_repository.rb @@ -42,6 +42,12 @@ class ContainerRepository < ActiveRecord::Base ContainerRegistry::Blob.new(self, config) end + # TODO, specs needed + # + def has_tags? + tags.any? + end + # TODO, add bang to this method # def delete_tags @@ -53,12 +59,6 @@ class ContainerRepository < ActiveRecord::Base end end - # TODO, specs needed - # - def empty? - tags.none? - end - # TODO, we will return a new ContainerRepository object here # def self.project_from_path(repository_path) |