Method: SystemConfigController#update_email

Defined in:
app/controllers/system_config_controller.rb

#update_emailObject

POST /system_config/email



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'app/controllers/system_config_controller.rb', line 90

def update_email
  @email_config = get_email_params

  if @email_config.valid?
    if @email_config.save
      flash[:safe_success] = 'The configuration has been saved.<br>The app will need to be restarted to use the new configuration.'
      redirect_to system_config_url
    else
      flash.now[:danger] = 'Failed to save the configuration.'
      render 'show_email'
    end
  else
    render 'show_email'
  end
end