Method: SuperSettings::Helper#render_partial

Defined in:
lib/super_settings/application/helper.rb

#render_partial(erb_file) ⇒ String

Render an ERB template.

Parameters:

  • the path to the ERB file to render

Returns:

  • the rendered HTML



64
65
66
67
# File 'lib/super_settings/application/helper.rb', line 64

def render_partial(erb_file)
  template = ERB.new(File.read(File.expand_path(erb_file, __dir__)))
  template.result(binding)
end