You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

043_add_relations_permissions.rb 743B

1234567891011121314
  1. class AddRelationsPermissions < ActiveRecord::Migration[4.2]
  2. # model removed
  3. class Permission < ActiveRecord::Base; end
  4. def self.up
  5. Permission.create :controller => "issue_relations", :action => "new", :description => "label_relation_new", :sort => 1080, :is_public => false, :mail_option => 0, :mail_enabled => 0
  6. Permission.create :controller => "issue_relations", :action => "destroy", :description => "label_relation_delete", :sort => 1085, :is_public => false, :mail_option => 0, :mail_enabled => 0
  7. end
  8. def self.down
  9. Permission.where(:controller => "issue_relations", :action => "new").each {|p| p.destroy}
  10. Permission.where(:controller => "issue_relations", :action => "destroy").each {|p| p.destroy}
  11. end
  12. end