Module: Maquina::ApplicationHelper

Defined in:
app/helpers/maquina/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#class_to_form_frame(klass) ⇒ Object



13
14
15
# File 'app/helpers/maquina/application_helper.rb', line 13

def class_to_form_frame(klass)
  "#{klass.to_s.underscore.tr("/", "_")}_form"
end

#maquina_importmap_tags(entry_point = "application", importmap: Maquina.configuration.importmap) ⇒ Object



5
6
7
8
9
10
11
# File 'app/helpers/maquina/application_helper.rb', line 5

def maquina_importmap_tags(entry_point = "application", importmap: Maquina.configuration.importmap)
  safe_join [
    javascript_inline_importmap_tag(importmap.to_json(resolver: self)),
    javascript_importmap_module_preload_tags(importmap),
    javascript_import_module_tag(entry_point)
  ].compact, "\n"
end