20201201000001_setting_add_sender_format_agent_name.rb 352 B

123456789101112
  1. class SettingAddSenderFormatAgentName < ActiveRecord::Migration[5.1]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.exists?(name: 'system_init_done')
  5. setting = Setting.find_by(name: 'ticket_define_email_from')
  6. return if !setting
  7. setting.options[:form][0][:options][:AgentName] = 'Agent Name'
  8. setting.save!
  9. end
  10. end