Project

General

Profile

Download (458 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_docker / app / models / docker_image.rb @ ada932ab

1
class DockerImage < ActiveRecord::Base
2
  has_many :tags, :class_name => 'DockerTag', :foreign_key => 'docker_image_id',
3
                  :dependent  => :destroy
4
  has_many :containers
5
  has_many :docker_image_docker_registries
6
  has_many :registries, :class_name => 'DockerRegistry', :uniq => true,
7
           :through => :docker_image_docker_registries
8

    
9
  attr_accessible :image_id, :size
10

    
11
  validates :image_id, :presence => true, :uniqueness => true
12
end