Class: Decidim::Category
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Decidim::Category
- Defined in:
- app/models/decidim/category.rb
Overview
Categories serve as a taxonomy for components to use for while in the context of a participatory process.
Class Method Summary collapse
-
.first_class ⇒ Object
Scope to return only the first-class categories, that is, those that are not subcategories.
Class Method Details
.first_class ⇒ Object
Scope to return only the first-class categories, that is, those that are not subcategories.
Returns an ActiveRecord::Relation.
17 18 19 |
# File 'app/models/decidim/category.rb', line 17 def self.first_class where(parent_id: nil) end |