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.

004_export_pdf.rb 714B

1234567891011121314
  1. class ExportPdf < ActiveRecord::Migration[4.2]
  2. # model removed
  3. class Permission < ActiveRecord::Base; end
  4. def self.up
  5. Permission.create :controller => "projects", :action => "export_issues_pdf", :description => "label_export_pdf", :sort => 1002, :is_public => true, :mail_option => 0, :mail_enabled => 0
  6. Permission.create :controller => "issues", :action => "export_pdf", :description => "label_export_pdf", :sort => 1015, :is_public => true, :mail_option => 0, :mail_enabled => 0
  7. end
  8. def self.down
  9. Permission.where("controller=? and action=?", 'projects', 'export_issues_pdf').first.destroy
  10. Permission.where("controller=? and action=?", 'issues', 'export_pdf').first.destroy
  11. end
  12. end