##// END OF EJS Templates
Rails4: replace deprecated Relation#update_all at ChangeRepositoriesToFullSti db migration...
Rails4: replace deprecated Relation#update_all at ChangeRepositoriesToFullSti db migration git-svn-id: http://svn.redmine.org/redmine/trunk@12664 e93f8b46-1217-0410-a6f0-8f06a7374b81

File last commit:

r12147:9b5ce4b7b44b
r12389:caf49264c89a
Show More
018_set_doc_and_files_notifications.rb
18 lines | 1.1 KiB | text/x-ruby | RubyLexer
/ db / migrate / 018_set_doc_and_files_notifications.rb
Jean-Philippe Lang
mail notifications added when:...
r193 class SetDocAndFilesNotifications < ActiveRecord::Migration
Jean-Philippe Lang
Merged 0.6 branch into trunk....
r663 # model removed
class Permission < ActiveRecord::Base; end
Jean-Philippe Lang
mail notifications added when:...
r193 def self.up
Toshi MARUYAMA
Rails4: db migrate: replace "Permission.find_by_controller_and_action"...
r12147 Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, true)}
Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, true)}
Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)}
Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, true)}
Jean-Philippe Lang
mail notifications added when:...
r193 end
def self.down
Toshi MARUYAMA
Rails4: db migrate: replace "Permission.find_by_controller_and_action"...
r12147 Permission.where(:controller => "projects", :action => "add_file").each {|p| p.update_attribute(:mail_option, false)}
Permission.where(:controller => "projects", :action => "add_document").each {|p| p.update_attribute(:mail_option, false)}
Permission.where(:controller => "documents", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)}
Permission.where(:controller => "issues", :action => "add_attachment").each {|p| p.update_attribute(:mail_option, false)}
Jean-Philippe Lang
mail notifications added when:...
r193 end
end