comparison .svn/pristine/2c/2c27236c8597defd08e66caac19e9d30961716f2.svn-base @ 909:cbb26bc654de redmine-1.3

Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author Chris Cannam
date Fri, 24 Feb 2012 19:09:32 +0000
parents
children
comparison
equal deleted inserted replaced
908:c6c2cbd0afee 909:cbb26bc654de
1 class SetDocAndFilesNotifications < ActiveRecord::Migration
2 # model removed
3 class Permission < ActiveRecord::Base; end
4
5 def self.up
6 Permission.find_by_controller_and_action("projects", "add_file").update_attribute(:mail_option, true)
7 Permission.find_by_controller_and_action("projects", "add_document").update_attribute(:mail_option, true)
8 Permission.find_by_controller_and_action("documents", "add_attachment").update_attribute(:mail_option, true)
9 Permission.find_by_controller_and_action("issues", "add_attachment").update_attribute(:mail_option, true)
10 end
11
12 def self.down
13 Permission.find_by_controller_and_action("projects", "add_file").update_attribute(:mail_option, false)
14 Permission.find_by_controller_and_action("projects", "add_document").update_attribute(:mail_option, false)
15 Permission.find_by_controller_and_action("documents", "add_attachment").update_attribute(:mail_option, false)
16 Permission.find_by_controller_and_action("issues", "add_attachment").update_attribute(:mail_option, false)
17 end
18 end