Fix missing controllers for search[id]

This commit is contained in:
BrokenEagle
2018-01-13 10:01:30 -08:00
parent a8c4179083
commit ba7fadf6e9
4 changed files with 8 additions and 7 deletions

View File

@@ -5,8 +5,8 @@ class NoteVersion < ApplicationRecord
attr_accessible :note_id, :x, :y, :width, :height, :body, :updater_id, :updater_ip_addr, :is_active, :post_id, :html_id, :version
def self.search(params)
q = where("true")
params = {} if params.blank?
q = super
return q if params.blank?
if params[:updater_id]
q = q.where(updater_id: params[:updater_id].split(",").map(&:to_i))