Class: Category
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Category
- Includes:
- Adva::HasPermalink
- Defined in:
- app/models/category.rb
Instance Method Summary collapse
Methods included from Adva::HasPermalink
Instance Method Details
#all_contents ⇒ Object
28 29 30 |
# File 'app/models/category.rb', line 28 def all_contents Content.by_category(self).order(published_at: :desc) end |
#owner ⇒ Object
24 25 26 |
# File 'app/models/category.rb', line 24 def owner section end |
#owners ⇒ Object
20 21 22 |
# File 'app/models/category.rb', line 20 def owners owner.owners << owner end |