We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01c5e7f commit 64bd4a0Copy full SHA for 64bd4a0
app/models/mixins/assignment_mixin.rb
@@ -173,8 +173,8 @@ def assignments
173
records = kind_of?(Class) ? all : self
174
assignment_map = records.index_by { |a| a.id }
175
Tag
176
- .includes(:taggings).references(:taggings)
177
- .where("taggings.taggable_type = ? and tags.name like ?", name, "#{namespace}/%")
+ .eager_load(:taggings).where(:taggings => {:taggable_type => name})
+ .where("tags.name like ?", "#{namespace}/%")
178
.each_with_object(Hash.new { |h, k| h[k] = [] }) do |tag, ret|
179
tag.taggings.each do |tagging|
180
tag_name = Tag.filter_ns([tag], namespace).first
0 commit comments