Merged r4013 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4025 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-08-22 19:49:26 +00:00
parent b5d64b9a2f
commit 0d7cead479
5 changed files with 57 additions and 4 deletions
@@ -0,0 +1,12 @@
class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration
def self.up
EnabledModule.find(:all, :conditions => ["name = ?", 'issue_tracking']).each do |e|
EnabledModule.create(:name => 'calendar', :project_id => e.project_id)
EnabledModule.create(:name => 'gantt', :project_id => e.project_id)
end
end
def self.down
EnabledModule.delete_all("name = 'calendar' OR name = 'gantt'")
end
end