Project

General

Profile

Patch #41894 ยป eusure-order-in-find_objects_from_params.patch

Go MAEDA, 2024-11-29 05:21

View differences:

app/controllers/watchers_controller.rb
return unless klass < ApplicationRecord
return unless klass < Redmine::Acts::Watchable::InstanceMethods
scope = klass.where(:id => Array.wrap(params[:object_id]))
scope = klass.where(:id => Array.wrap(params[:object_id])).order(:id)
if klass.reflect_on_association(:project)
scope = scope.preload(:project => :enabled_modules)
end
    (1-1/1)