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:
parent
64d843a4d7
commit
bf05656c36
|
@ -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
|
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,
|
:conditions => statement,
|
||||||
:order => order_option,
|
:order => order_option,
|
||||||
:joins => joins,
|
:joins => joins,
|
||||||
:limit => options[:limit],
|
:limit => options[:limit],
|
||||||
:offset => options[:offset]
|
:offset => options[:offset]).find_ids
|
||||||
rescue ::ActiveRecord::StatementInvalid => e
|
rescue ::ActiveRecord::StatementInvalid => e
|
||||||
raise StatementInvalid.new(e.message)
|
raise StatementInvalid.new(e.message)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue