Sha256: 3a54b6a65eb447ceb49387942f444fac075009194444b67ba14bd5b060366cb9

Contents?: true

Size: 379 Bytes

Versions: 19

Compression:

Stored size: 379 Bytes

Contents

# frozen_string_literal: true
module Thredded
  class Category < ActiveRecord::Base
    extend FriendlyId
    belongs_to :messageboard
    has_many :topic_categories
    has_many :topics, through: :topic_categories
    friendly_id :name, use: [:history, :scoped], scope: :messageboard

    validates :name, presence: true
    validates :messageboard_id, presence: true
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
thredded-0.10.1 app/models/thredded/category.rb
thredded-0.10.0 app/models/thredded/category.rb
thredded-0.9.4 app/models/thredded/category.rb
thredded-0.9.3 app/models/thredded/category.rb
thredded-0.9.2 app/models/thredded/category.rb
thredded-0.9.1 app/models/thredded/category.rb
thredded-0.8.4 app/models/thredded/category.rb
thredded-0.8.2 app/models/thredded/category.rb
thredded-0.7.0 app/models/thredded/category.rb
thredded-0.6.3 app/models/thredded/category.rb
thredded-0.6.2 app/models/thredded/category.rb
thredded-0.6.1 app/models/thredded/category.rb
thredded-0.6.0 app/models/thredded/category.rb
thredded-0.5.1 app/models/thredded/category.rb
thredded-0.5.0 app/models/thredded/category.rb
thredded-0.4.0 app/models/thredded/category.rb
thredded-0.3.2 app/models/thredded/category.rb
thredded-0.3.1 app/models/thredded/category.rb
thredded-0.3.0 app/models/thredded/category.rb