Class: DockerRegistry
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- DockerRegistry
- Includes:
- Authorizable, Encryptable, Taxonomix
- Defined in:
- app/models/docker_registry.rb
Instance Method Summary collapse
Instance Method Details
#prefixed_url(image_name) ⇒ Object
24 25 26 27 |
# File 'app/models/docker_registry.rb', line 24 def prefixed_url(image_name) uri = URI(url) "#{uri.hostname}:#{uri.port}/#{image_name}" end |
#used_location_ids ⇒ Object
12 13 14 15 16 |
# File 'app/models/docker_registry.rb', line 12 def used_location_ids Location.joins(:taxable_taxonomies).where( 'taxable_taxonomies.taxable_type' => 'DockerRegistry', 'taxable_taxonomies.taxable_id' => id).pluck(:id) end |
#used_organization_ids ⇒ Object
18 19 20 21 22 |
# File 'app/models/docker_registry.rb', line 18 def used_organization_ids Organization.joins(:taxable_taxonomies).where( 'taxable_taxonomies.taxable_type' => 'DockerRegistry', 'taxable_taxonomies.taxable_id' => id).pluck(:id) end |