search: refactor to pass in the current user explicitly.
This commit is contained in:
@@ -5,8 +5,8 @@ class NoteVersion < ApplicationRecord
|
||||
belongs_to :note
|
||||
belongs_to_updater :counter_cache => "note_update_count"
|
||||
|
||||
def self.search(params)
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :is_active, :x, :y, :width, :height, :body, :version, :updater, :note, :post)
|
||||
def self.search(params, current_user)
|
||||
q = search_attributes(params, [:id, :created_at, :updated_at, :is_active, :x, :y, :width, :height, :body, :version, :updater, :note, :post], current_user: current_user)
|
||||
|
||||
q.apply_default_order(params)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user