annotate db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb @ 69:dc22c3eb3c81
luisf
Feature #35:
- Does not show the label "My Projects" if the user does not have any projects.
- If the user is not signed in only shows the default Projects list.
author |
luisf |
date |
Mon, 06 Dec 2010 18:12:52 +0000 |
parents |
1d32c0a0efbf |
children |
622f24f53b42 |
rev |
line source |
Chris@14
|
1 class EnableCalendarAndGanttModulesWhereAppropriate < ActiveRecord::Migration
|
Chris@14
|
2 def self.up
|
Chris@14
|
3 EnabledModule.find(:all, :conditions => ["name = ?", 'issue_tracking']).each do |e|
|
Chris@14
|
4 EnabledModule.create(:name => 'calendar', :project_id => e.project_id)
|
Chris@14
|
5 EnabledModule.create(:name => 'gantt', :project_id => e.project_id)
|
Chris@14
|
6 end
|
Chris@14
|
7 end
|
Chris@14
|
8
|
Chris@14
|
9 def self.down
|
Chris@14
|
10 EnabledModule.delete_all("name = 'calendar' OR name = 'gantt'")
|
Chris@14
|
11 end
|
Chris@14
|
12 end
|