Sha256: fd3edb7a91b5e33b67f7a04cd398db0b6c79e8a1a35bfd3b2129b724a4c95a16
Contents?: true
Size: 378 Bytes
Versions: 1
Compression:
Stored size: 378 Bytes
Contents
module KnowledgeBase class Category < ActiveRecord::Base extend FriendlyId publishable friendly_id :title, use: :slugged belongs_to :category has_many :category_article_associations has_many :articles, through: :category_article_associations scope :root, -> { where parent_id: nil } scope :published, -> { where published: true } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
knowledge_base-0.0.3 | app/models/knowledge_base/category.rb |