Sha256: fadc08aaf7d8d20c6eb425a0a354f23e3933e248bd7ef370969936cf505f5155

Contents?: true

Size: 195 Bytes

Versions: 4

Compression:

Stored size: 195 Bytes

Contents

module Theblog
  class Category < ContentNode
    has_many :posts, foreign_key: :parent_node_id

    validates_presence_of :title, :slug
    validates_uniqueness_of :slug, scope: :type
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
theblog-0.0.2.3 app/models/theblog/category.rb
theblog-0.0.2.2 app/models/theblog/category.rb
theblog-0.0.2.1 app/models/theblog/category.rb
theblog-0.0.2 app/models/theblog/category.rb