Class: Optimacms::Admin::MaintenanceController

Inherits:
AdminBaseController show all
Defined in:
app/controllers/optimacms/admin/maintenance_controller.rb

Instance Method Summary collapse

Methods inherited from AdminBaseController

#after_sign_in_path_for, #redirect_to_res, #set_layout_modal_old

Methods inherited from Optimacms::ApplicationController

#current_lang, #not_found

Instance Method Details

#assets_precompileObject


27
28
29
30
31
# File 'app/controllers/optimacms/admin/maintenance_controller.rb', line 27

def assets_precompile
  res = %x(rake assets:precompile)

  return redirect_success
end

#indexObject


9
10
11
# File 'app/controllers/optimacms/admin/maintenance_controller.rb', line 9

def index

end

#infoObject


23
24
25
# File 'app/controllers/optimacms/admin/maintenance_controller.rb', line 23

def info

end

#redirect_success(msg = 'OK') ⇒ Object

helpers


35
36
37
38
# File 'app/controllers/optimacms/admin/maintenance_controller.rb', line 35

def redirect_success(msg='OK')
  flash[:info] = msg
  redirect_to url_index
end

#restartObject


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

def restart
  @res = Optimacms::Sys::AppFunctions.restart


  redirect_to_res @res
end

#url_indexObject


4
5
6
# File 'app/controllers/optimacms/admin/maintenance_controller.rb', line 4

def url_index
  Optimacms::Engine.routes.url_helpers.maintenance_path
end