Class: Jav::DebugController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#_current_user, #check_jav_license, #context, #exception_logger, #init_app

Methods included from Concerns::Breadcrumbs

#add_breadcrumb, #jav_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, #decode_filter_params, #empty_state, #encode_filter_params, #frame_id, #get_model_class, #input_classes, #mount_path, #render_license_warning, #render_license_warnings, #root_path_without_url, #svg, #white_panel_classes

Instance Method Details

#indexObject



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

def index; end

#refresh_licenseObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/controllers/jav/debug_controller.rb', line 9

def refresh_license
  license = Licensing::LicenseManager.refresh_license request

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

  redirect_back fallback_location: jav.jav_private_debug_index_path
end

#reportObject



7
# File 'app/controllers/jav/debug_controller.rb', line 7

def report; end