@@ -609,12 +609,12 class Query < ActiveRecord::Base | |||
|
609 | 609 | |
|
610 | 610 | joins = (order_option && order_option.include?('authors')) ? "LEFT OUTER JOIN users authors ON authors.id = #{Issue.table_name}.author_id" : nil |
|
611 | 611 | |
|
612 |
Issue.visible.scoped(:conditions => options[:conditions]). |
|
|
612 | Issue.visible.scoped(:conditions => options[:conditions]).scoped(:include => ([:status, :project] + (options[:include] || [])).uniq, | |
|
613 | 613 | :conditions => statement, |
|
614 | 614 | :order => order_option, |
|
615 | 615 | :joins => joins, |
|
616 | 616 | :limit => options[:limit], |
|
617 | :offset => options[:offset] | |
|
617 | :offset => options[:offset]).find_ids | |
|
618 | 618 | rescue ::ActiveRecord::StatementInvalid => e |
|
619 | 619 | raise StatementInvalid.new(e.message) |
|
620 | 620 | end |
General Comments 0
You need to be logged in to leave comments.
Login now