adds missing updaters
to forum posts, comments, and artist versions
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class ArtistVersion < ActiveRecord::Base
|
class ArtistVersion < ActiveRecord::Base
|
||||||
belongs_to :updater
|
belongs_to :updater, :class_name => "User"
|
||||||
belongs_to :artist
|
belongs_to :artist
|
||||||
|
|
||||||
def self.search(params)
|
def self.search(params)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ class Comment < ActiveRecord::Base
|
|||||||
validates_format_of :body, :with => /\S/, :message => 'has no content'
|
validates_format_of :body, :with => /\S/, :message => 'has no content'
|
||||||
belongs_to :post
|
belongs_to :post
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
|
belongs_to :updater, :class_name => "User"
|
||||||
has_many :votes, :class_name => "CommentVote", :dependent => :destroy
|
has_many :votes, :class_name => "CommentVote", :dependent => :destroy
|
||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
before_validation :initialize_updater
|
before_validation :initialize_updater
|
||||||
|
|||||||
@@ -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 :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]
|
attr_accessible :is_locked, :is_sticky, :is_deleted, :as => [:admin, :moderator, :janitor]
|
||||||
belongs_to :creator, :class_name => "User"
|
belongs_to :creator, :class_name => "User"
|
||||||
|
belongs_to :updater, :class_name => "User"
|
||||||
belongs_to :topic, :class_name => "ForumTopic"
|
belongs_to :topic, :class_name => "ForumTopic"
|
||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
before_validation :initialize_updater
|
before_validation :initialize_updater
|
||||||
|
|||||||
Reference in New Issue
Block a user