Class: Admin::ApplicationSettingsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/application_settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#clear_repository_check_statesObject


22
23
24
25
26
27
28
29
# File 'app/controllers/admin/application_settings_controller.rb', line 22

def clear_repository_check_states
  RepositoryCheck::ClearWorker.perform_async

  redirect_to(
    admin_application_settings_path,
    notice: 'Started asynchronous removal of all repository check states.'
  )
end

#reset_runners_tokenObject


16
17
18
19
20
# File 'app/controllers/admin/application_settings_controller.rb', line 16

def reset_runners_token
  @application_setting.reset_runners_registration_token!
  flash[:notice] = 'New runners registration token has been generated!'
  redirect_to admin_runners_path
end

#showObject


4
5
# File 'app/controllers/admin/application_settings_controller.rb', line 4

def show
end

#updateObject


7
8
9
10
11
12
13
14
# File 'app/controllers/admin/application_settings_controller.rb', line 7

def update
  if @application_setting.update_attributes(application_setting_params)
    redirect_to admin_application_settings_path,
      notice: 'Application settings saved successfully'
  else
    render :show
  end
end