annotate .svn/pristine/29/2973e97a2549893414a5beb545b08538df56d208.svn-base @ 1524:82fac3dcf466 redmine-2.5-integration

Fix failure to interpret Javascript when autocompleting members for project
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Thu, 11 Sep 2014 10:24:38 +0100
parents dffacf8a6908
children
rev   line source
Chris@1517 1 class SetDocAndFilesNotifications < ActiveRecord::Migration
Chris@1517 2 # model removed
Chris@1517 3 class Permission < ActiveRecord::Base; end
Chris@1517 4
Chris@1517 5 def self.up
Chris@1517 6 Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, true)}
Chris@1517 7 Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, true)}
Chris@1517 8 Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)}
Chris@1517 9 Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)}
Chris@1517 10 end
Chris@1517 11
Chris@1517 12 def self.down
Chris@1517 13 Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, false)}
Chris@1517 14 Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, false)}
Chris@1517 15 Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)}
Chris@1517 16 Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)}
Chris@1517 17 end
Chris@1517 18 end