updated readme

This commit is contained in:
Mike Kelley
2011-08-27 01:41:48 -06:00
commit 17fee3c6d5
98 changed files with 11421 additions and 0 deletions

19
app/models/forum.rb Normal file
View File

@@ -0,0 +1,19 @@
class Forum < ActiveRecord::Base
# Associations
has_many :topics, :dependent => :destroy
has_many :posts, :through => :topics
belongs_to :category
# Accessors
attr_accessible :title, :description, :state, :position, :category_id
# Scopes
default_scope :order => 'position ASC'
# Validations
validates :title, :presence => true
validates :description, :presence => true
validates :category_id, :presence => true
end