adds missing updaters

to forum posts, comments, and artist versions
This commit is contained in:
Toks
2013-03-30 10:22:40 -04:00
parent 2dd21e0367
commit eed6ece3ec
3 changed files with 3 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
class ArtistVersion < ActiveRecord::Base
belongs_to :updater
belongs_to :updater, :class_name => "User"
belongs_to :artist
def self.search(params)

View File

@@ -3,6 +3,7 @@ class Comment < ActiveRecord::Base
validates_format_of :body, :with => /\S/, :message => 'has no content'
belongs_to :post
belongs_to :creator, :class_name => "User"
belongs_to :updater, :class_name => "User"
has_many :votes, :class_name => "CommentVote", :dependent => :destroy
before_validation :initialize_creator, :on => :create
before_validation :initialize_updater

View File

@@ -2,6 +2,7 @@ class ForumPost < ActiveRecord::Base
attr_accessible :body, :topic_id, :as => [:member, :builder, :janitor, :privileged, :platinum, :contributor, :admin, :moderator, :default]
attr_accessible :is_locked, :is_sticky, :is_deleted, :as => [:admin, :moderator, :janitor]
belongs_to :creator, :class_name => "User"
belongs_to :updater, :class_name => "User"
belongs_to :topic, :class_name => "ForumTopic"
before_validation :initialize_creator, :on => :create
before_validation :initialize_updater