Rails 3.1 compatibility.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9074 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-03-04 11:45:15 +00:00
parent 64d843a4d7
commit bf05656c36
1 changed files with 2 additions and 2 deletions

View File

@ -609,12 +609,12 @@ class Query < ActiveRecord::Base
joins = (order_option && order_option.include?('authors')) ? "LEFT OUTER JOIN users authors ON authors.id = #{Issue.table_name}.author_id" : nil
Issue.visible.scoped(:conditions => options[:conditions]).find_ids :include => ([:status, :project] + (options[:include] || [])).uniq,
Issue.visible.scoped(:conditions => options[:conditions]).scoped(:include => ([:status, :project] + (options[:include] || [])).uniq,
:conditions => statement,
:order => order_option,
:joins => joins,
:limit => options[:limit],
:offset => options[:offset]
:offset => options[:offset]).find_ids
rescue ::ActiveRecord::StatementInvalid => e
raise StatementInvalid.new(e.message)
end