20160527000001_update_setting_no_auto_response.rb 751 B

123456789101112131415161718192021222324
  1. class UpdateSettingNoAutoResponse < ActiveRecord::Migration
  2. def up
  3. # can be deleted later, db/seeds.rb already updated
  4. Setting.create_or_update(
  5. title: 'Block Notifications',
  6. name: 'send_no_auto_response_reg_exp',
  7. area: 'Email::Base',
  8. description: 'If this regex matches, no notification will be send by the sender.',
  9. options: {
  10. form: [
  11. {
  12. display: '',
  13. null: false,
  14. name: 'send_no_auto_response_reg_exp',
  15. tag: 'input',
  16. },
  17. ],
  18. },
  19. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?\..+?',
  20. preferences: { online_service_disable: true },
  21. frontend: false
  22. )
  23. end
  24. end