Class: Avo::DebugController

Inherits:
ApplicationController show all
Defined in:
app/controllers/avo/debug_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#_current_user, #check_avo_license, #context, #exception_logger, #init_app, #mount_path, #render, #turbo_frame_request?

Methods included from Concerns::Breadcrumbs

#add_breadcrumb, #avo_breadcrumbs

Methods included from UrlHelpers

#edit_resource_path, #new_resource_path, #related_resources_path, #resource_attach_path, #resource_detach_path, #resource_path, #resource_view_path, #resources_path

Methods included from ApplicationHelper

#a_button, #a_link, #button_classes, #empty_state, #get_model_class, #input_classes, #render_license_warning, #render_license_warnings, #root_path_without_url, #svg, #white_panel_classes

Instance Method Details

#indexObject



5
6
# File 'app/controllers/avo/debug_controller.rb', line 5

def index
end

#refresh_licenseObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/avo/debug_controller.rb', line 11

def refresh_license
  license = Licensing::LicenseManager.refresh_license request

  if license.valid?
    flash[:notice] = "avohq.io responded: \"#{license.id.humanize} license is valid\"."
  elsif license.response['reason'].present?
    flash[:error] = "avohq.io responded: \"#{license.response['reason']}\"."
  else
    flash[:error] = license.response['error']
  end

  redirect_back fallback_location: avo.avo_private_debug_index_path
end

#reportObject



8
9
# File 'app/controllers/avo/debug_controller.rb', line 8

def report
end