class Mdm::Tag

Tag {#hosts_tags assigned} to {#hosts}. Tags can be used to group together hosts for targeting and reporting.

Public Instance Methods

destroy_if_orphaned() click to toggle source

Destroy this tag if it has no {#hosts_tags}

@return [void]

# File app/models/mdm/tag.rb, line 100
def destroy_if_orphaned
  self.class.transaction do
    if hosts_tags.empty?
      destroy
    end
  end
end
to_s() click to toggle source

(see name)

# File app/models/mdm/tag.rb, line 109
def to_s
  name
end