diff --git a/app/models/artist_version.rb b/app/models/artist_version.rb index 3677675e6..0bd3b40a3 100644 --- a/app/models/artist_version.rb +++ b/app/models/artist_version.rb @@ -1,5 +1,5 @@ class ArtistVersion < ActiveRecord::Base - belongs_to :updater + belongs_to :updater, :class_name => "User" belongs_to :artist def self.search(params) diff --git a/app/models/comment.rb b/app/models/comment.rb index 604bcd6f5..6c4fd6faa 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -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 diff --git a/app/models/forum_post.rb b/app/models/forum_post.rb index 0a239d6ce..32f5dd964 100644 --- a/app/models/forum_post.rb +++ b/app/models/forum_post.rb @@ -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