Mercurial > hg > soundsoftware-site
comparison .svn/pristine/29/2973e97a2549893414a5beb545b08538df56d208.svn-base @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
1 class SetDocAndFilesNotifications < ActiveRecord::Migration | |
2 # model removed | |
3 class Permission < ActiveRecord::Base; end | |
4 | |
5 def self.up | |
6 Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, true)} | |
7 Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, true)} | |
8 Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)} | |
9 Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)} | |
10 end | |
11 | |
12 def self.down | |
13 Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, false)} | |
14 Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, false)} | |
15 Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)} | |
16 Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)} | |
17 end | |
18 end |