mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-21 15:57:55 -05:00
17 lines
294 B
Ruby
17 lines
294 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Forum < ApplicationRecord
|
|
extend FriendlyId
|
|
include Ownable
|
|
|
|
validates :name, presence: true
|
|
validates :description, presence: true
|
|
friendly_id :name, use: %i(slugged finders)
|
|
|
|
has_many :posts, dependent: :destroy
|
|
|
|
def to_s
|
|
name
|
|
end
|
|
end
|