Method: SuperSettings::Application#render

Defined in:
lib/super_settings/application.rb

#renderString

Render the web UI application HTML.

Returns:

  • (String)

    the rendered HTML



33
34
35
36
37
38
39
# File 'lib/super_settings/application.rb', line 33

def render
  template = ERB.new(File.read(File.expand_path(File.join("application", "index.html.erb"), __dir__)))
  html = template.result(binding)
  html = render_layout { html } if @layout
  html = html.html_safe if html.respond_to?(:html_safe)
  html
end