This commit is contained in:
albert
2011-03-29 13:56:30 -04:00
parent f9c961cdc6
commit 5856b105f5
30 changed files with 236 additions and 1733 deletions

View File

@@ -5,7 +5,7 @@ class PostAppeal < ActiveRecord::Base
belongs_to :post
validates_presence_of :reason, :creator_id, :creator_ip_addr
validate :validate_post_is_inactive
validate :creator_is_not_limited
validate :validate_creator_is_not_limited
before_validation :initialize_creator, :on => :create
validates_uniqueness_of :creator_id, :scope => :post_id
scope :for_user, lambda {|user_id| where(["creator_id = ?", user_id])}