Class: Category

Inherits:
Classification show all
Defined in:
app/models/category.rb

Constant Summary

Constants inherited from Classification

Classification::DEFAULT_NAMESPACE, Classification::FIXTURE_FILE, Classification::NAME_MAX_LENGTH

Constants inherited from ApplicationRecord

ApplicationRecord::FIXTURE_DIR

Constants included from ArRegion

ArRegion::CID_OR_ID_MATCHER, ArRegion::COMPRESSED_ID_SEPARATOR, ArRegion::DEFAULT_RAILS_SEQUENCE_FACTOR, ArRegion::RE_COMPRESSED_ID

Instance Attribute Summary

Attributes inherited from Classification

#name, #ns

Instance Method Summary collapse

Methods inherited from Classification

#add_entry, #assign_entry_to, bulk_reassignment, categories, #category, #category?, category_names_for_perf_by_tag, classify, classify_by_tag, create_category!, #enforce_policy, #entries, export_to_array, #export_to_array, export_to_yaml, #export_to_yaml, find_assigned_entries, #find_by_entry, find_by_name, find_by_names, #find_entry_by_name, first_cat_entry, get_tags_from_object, hash_all_by_type_and_name, import_from_hash, import_from_yaml, managed, parent_ids, #remove_entry_from, sanitize_name, seed, #tag2ns, #tag_name, tag_name_split, tag_name_to_objects, tag_to_model_hash, tags_arel, #to_tag, unclassify, unclassify_by_tag, with_tag_name

Methods included from ArTableLock

#with_lock

Methods included from ToModelHash

#to_model_hash, #to_model_yaml

Methods included from ArLock

#lock

Methods included from ArRegion

anonymous_class_with_ar_region, #compressed_id, #in_current_region?, #miq_region, #my_region_number, #region_description, #region_number, #split_id

Methods inherited from ActiveRecord::Base

acts_as_miq_set, acts_as_miq_set_member, acts_as_miq_taggable, column_names_symbols, extract_ids, extract_objects, model_suffix, #number_of, paginate, truncate

Methods included from VirtualDelegates

select_from_alias, select_from_alias_table

Methods included from Vmdb::Logging

#_log

Instance Method Details

#tagsObject


4
5
6
# File 'app/models/category.rb', line 4

def tags
  Tag.joins(:classification).where(:classifications => {:parent_id => id})
end