Fixed: calendar and gantt broken with Rails 2.0

git-svn-id: http://redmine.rubyforge.org/svn/trunk@982 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-12-12 21:03:36 +00:00
parent 76ed8cc200
commit d5cc40c9b6
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ class Project < ActiveRecord::Base
conditions = ["#{Issue.table_name}.project_id IN (#{ids.join(',')})"]
end
conditions ||= ["#{Issue.table_name}.project_id = ?", id]
Issue.with_scope :find => { :conditions => conditions } do
# Quick and dirty fix for Rails 2 compatibility
Issue.send(:with_scope, :find => { :conditions => conditions }) do
yield
end
end