This commit is contained in:
r888888888
2014-04-14 14:32:01 -07:00
parent 7a61048d69
commit fad0ab7c93
105 changed files with 610 additions and 485 deletions

View File

@@ -8,6 +8,7 @@ class PostAppeal < ActiveRecord::Base
validate :validate_creator_is_not_limited
before_validation :initialize_creator, :on => :create
validates_uniqueness_of :creator_id, :scope => :post_id, :message => "have already appealed this post"
attr_accessible :post_id, :post, :reason
module SearchMethods
def resolved
@@ -31,7 +32,7 @@ class PostAppeal < ActiveRecord::Base
end
def search(params)
q = scoped
q = where("true")
return q if params.blank?
if params[:creator_id].present?