Project

General

Profile

« Previous | Next » 

Revision f1a2c140

Added by Dominic Cleal over 8 years ago

fixes #8521 - fix classes accessors, copy overrides on host clone

The various 'classes' accessors that are used in the UI for displaying
the Puppet classes tab only really worked for saved objects, so they're
changed to work better on an unsaved cloned object. Tests now check
all associations and UI accessors return consistent results for various
types of class associations.

View differences:

app/models/config_group.rb
has_many :config_group_classes
has_many :puppetclasses, :through => :config_group_classes, :dependent => :destroy
has_many :host_config_groups
has_many_hosts :through => :host_config_groups
has_many_hosts :through => :host_config_groups, :source => :host, :source_type => 'Host::Managed'
has_many :hostgroups, :through => :host_config_groups, :source => :host, :source_type => 'Hostgroup'
validates :name, :presence => true, :uniqueness => true

Also available in: Unified diff