This commit is contained in:
r888888888
2014-04-14 14:32:01 -07:00
parent 7a61048d69
commit fad0ab7c93
105 changed files with 610 additions and 485 deletions

View File

@@ -2,6 +2,7 @@ class PostVersion < ActiveRecord::Base
belongs_to :post
belongs_to :updater, :class_name => "User"
before_validation :initialize_updater
attr_accessible :post_id, :is_status_locked, :is_rating_locked, :is_note_locked, :source, :rating, :tag_string, :old_tag_string, :old_parent_id, :old_source, :old_rating, :last_noted_at, :parent_id, :tags
module SearchMethods
def for_user(user_id)
@@ -13,7 +14,7 @@ class PostVersion < ActiveRecord::Base
end
def search(params)
q = scoped
q = where("true")
params = {} if params.blank?
if params[:updater_name].present?