Class: Plugins::CamaleonGoogleAnalytic::AdminController

Inherits:
Apps::PluginsAdminController
  • Object
show all
Includes:
MainHelper
Defined in:
app/controllers/plugins/camaleon_google_analytic/admin_controller.rb

Instance Method Summary collapse

Instance Method Details

#save_settingsObject



8
9
10
11
12
13
14
# File 'app/controllers/plugins/camaleon_google_analytic/admin_controller.rb', line 8

def save_settings
  current_site.set_meta('camaleon_google_analytic_config',
                        {code: params[:camaleon_google_analytic][:code]
                        })
  flash[:notice] = "#{t('plugin.camaleon_google_analytic.messages.settings_saved')}"
  redirect_to action: :settings
end

#settingsObject



4
5
6
# File 'app/controllers/plugins/camaleon_google_analytic/admin_controller.rb', line 4

def settings
  @google_analytic = current_site.get_meta('camaleon_google_analytic_config')
end