Class: CamaleonCms::TermTaxonomy
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- CamaleonCms::TermTaxonomy
- Includes:
- CustomFieldsRead, Metas
- Defined in:
- app/models/camaleon_cms/term_taxonomy.rb
Direct Known Subclasses
Category, NavMenu, NavMenuItem, Plugin, PostTag, PostType, Site, Theme, UserRole, Widget::Main, Widget::Sidebar
Instance Method Summary collapse
-
#children ⇒ Object
return all children taxonomy sample: sub categories of a category.
-
#in_nav_menu_items ⇒ Object
return all menu items in which this taxonomy was assigned.
-
#skip_slug_validation? ⇒ Boolean
permit to skip slug validations for children models, like menu items.
Methods included from CustomFieldsRead
#add_custom_field_group, #add_custom_field_to_default_group, #get_field_groups, #get_field_object, #get_field_value, #get_field_values, #get_field_values_hash, #get_fields_grouped, #get_fields_object, #get_user_field_groups, #save_field_value, #set_field_value, #set_field_values, #update_field_value
Methods included from Metas
#delete_meta, #delete_option, #fix_save_metas_options_no_changed, #get_meta, #get_option, #options, #save_metas_options, #save_metas_options_skip, #set_meta, #set_metas, #set_multiple_options, #set_option
Instance Method Details
#children ⇒ Object
return all children taxonomy sample: sub categories of a category
40 41 42 |
# File 'app/models/camaleon_cms/term_taxonomy.rb', line 40 def children CamaleonCms::TermTaxonomy.where("#{CamaleonCms::TermTaxonomy.table_name}.parent_id = ?", self.id) end |
#in_nav_menu_items ⇒ Object
return all menu items in which this taxonomy was assigned
45 46 47 |
# File 'app/models/camaleon_cms/term_taxonomy.rb', line 45 def CamaleonCms::NavMenuItem.where(url: self.id, kind: self.taxonomy) end |
#skip_slug_validation? ⇒ Boolean
permit to skip slug validations for children models, like menu items
50 51 52 |
# File 'app/models/camaleon_cms/term_taxonomy.rb', line 50 def skip_slug_validation? false end |