* Missing files

* Work on post exploration code by traversing dates
This commit is contained in:
albert
2010-10-27 20:16:43 -04:00
parent f9cdcef2c0
commit fc0a076aca
32 changed files with 371 additions and 189 deletions

View File

@@ -1,11 +1,16 @@
class CommentVote < ActiveRecord::Base
class Error < Exception ; end
attr_accessor :is_positive
belongs_to :comment
belongs_to :user
before_validation :initialize_user, :on => :create
validates_presence_of :user_id, :comment_id
def self.prune!
destroy_all(["created_at < ?", 14.days.ago])
end
def initialize_user
self.user_id = CurrentUser.user.id
end
end