Sha256: 11c28117c9d71149aec8193068f4a9eaa8df2d1f0bd927772152d74390f37f9f

Contents?: true

Size: 498 Bytes

Versions: 5

Compression:

Stored size: 498 Bytes

Contents

class Forum < ActiveRecord::Base
  acts_as_taggable
  acts_as_list

  validates_presence_of :name

  has_many :moderatorships, :dependent => :destroy
  has_many :moderators, :through => :moderatorships, :source => :user

  has_many :topics, :dependent => :destroy

  has_many :sb_posts

  belongs_to :owner, :polymorphic => true

  format_attribute :description

  attr_accessible :name, :position, :description
  
  def to_param
    id.to_s << "-" << (name ? name.parameterize : '' )
  end
  
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
community_engine-2.3.2 app/models/forum.rb
community_engine-2.3.1 app/models/forum.rb
community_engine-2.3.0 app/models/forum.rb
community_engine-2.1.0 app/models/forum.rb
community_engine-2.0.0 app/models/forum.rb