Class: Plugins::CamaleonMandrill::AdminController

Inherits:
CamaleonCms::Apps::PluginsAdminController
  • Object
show all
Defined in:
app/controllers/plugins/camaleon_mandrill/admin_controller.rb

Instance Method Summary collapse

Instance Method Details

#save_settingsObject



7
8
9
10
11
12
13
14
15
16
# File 'app/controllers/plugins/camaleon_mandrill/admin_controller.rb', line 7

def save_settings
  current_site.set_meta('mandrill_config',
                        {
                          smtp_username: params[:mandrill][:smtp_username],
                          smtp_password: params[:mandrill][:smtp_password],
                          default_from: params[:mandrill][:default_from],
                        })
  flash[:notice] = "#{t('plugin.mandrill.messages.settings_saved')}"
  redirect_to action: :settings
end

#settingsObject



3
4
5
# File 'app/controllers/plugins/camaleon_mandrill/admin_controller.rb', line 3

def settings
  @mandrill = current_site.get_meta('mandrill_config')
end