Post#approve!: move validation to post_approval.rb

This commit is contained in:
evazion
2017-04-03 00:10:36 -05:00
parent 70f02af8d7
commit 258fc37bfe
3 changed files with 24 additions and 21 deletions

View File

@@ -77,6 +77,7 @@ class User < ActiveRecord::Base
#after_create :notify_sock_puppets
has_many :feedback, :class_name => "UserFeedback", :dependent => :destroy
has_many :posts, :foreign_key => "uploader_id"
has_many :post_approvals, :dependent => :destroy
has_many :post_votes
has_many :bans, lambda {order("bans.id desc")}
has_one :recent_ban, lambda {order("bans.id desc")}, :class_name => "Ban"