This commit is contained in:
Toks
2013-08-27 22:24:07 -04:00
parent adbe269aea
commit 1b31961184
3 changed files with 11 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ class Post < ActiveRecord::Base
has_many :comments, :order => "comments.id", :dependent => :destroy
has_many :children, :class_name => "Post", :foreign_key => "parent_id", :order => "posts.id"
has_many :disapprovals, :class_name => "PostDisapproval", :dependent => :destroy
has_many :favorites
validates_uniqueness_of :md5
validate :post_is_not_its_own_parent
attr_accessible :source, :rating, :tag_string, :old_tag_string, :last_noted_at, :parent_id, :as => [:member, :builder, :gold, :platinum, :contributor, :janitor, :moderator, :admin, :default]