Sha256: 242ee12885339d534f31b7c468339e85845f0d23395513a361cc2d6bb45508ce

Contents?: true

Size: 785 Bytes

Versions: 3

Compression:

Stored size: 785 Bytes

Contents

#
# Copyright (c) 2014 Red Hat Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 3 (GPLv3). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv3
# along with this software; if not, see http://www.gnu.org/licenses/gpl.txt
#

module ::Scaptimony
  class AuditableHost < ActiveRecord::Base
    # Links Foreman's Host table with SCAPtimony's Asset table
    belongs_to :asset, :inverse_of => :auditable_host
    belongs_to_host :inverse_of => :auditable_host
  end

 class Asset < ActiveRecord::Base
    has_one :auditable_host, :inverse_of => :asset
    has_one :host, :through => :auditable_host
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
foreman_openscap-0.2.1 app/models/scaptimony/asset.rb
foreman_openscap-0.2.0 app/models/scaptimony/asset.rb
foreman_openscap-0.1.0 app/models/scaptimony/asset.rb