Module: RailsServerMonitor::ApplicationHelper

Includes:
Webpacker::Helper
Defined in:
app/helpers/rails_server_monitor/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_webpacker_instanceObject



9
10
11
# File 'app/helpers/rails_server_monitor/application_helper.rb', line 9

def current_webpacker_instance
  RailsServerMonitor.webpacker
end

#safe_render_css(name, **options) ⇒ Object



21
22
23
24
25
26
27
# File 'app/helpers/rails_server_monitor/application_helper.rb', line 21

def safe_render_css(name, **options)
  if respond_to?(:javascript_packs_with_chunks_tag)
    return stylesheet_packs_with_chunks_tag(name, **options)
  end

  stylesheet_pack_tag(name, **options)
end

#safe_render_js(name, **options) ⇒ Object



13
14
15
16
17
18
19
# File 'app/helpers/rails_server_monitor/application_helper.rb', line 13

def safe_render_js(name, **options)
  if respond_to?(:javascript_packs_with_chunks_tag)
    return javascript_packs_with_chunks_tag(name, **options)
  end

  javascript_pack_tag(name, **options)
end

#server_versionObject



29
30
31
# File 'app/helpers/rails_server_monitor/application_helper.rb', line 29

def server_version
  RailsServerMonitor::VERSION
end