Method: Primer::Forms::ActsAsComponent#template_root_path

Defined in:
app/lib/primer/forms/acts_as_component.rb

#template_root_pathObject


69
70
71
72
73
74
75
76
77
# File 'app/lib/primer/forms/acts_as_component.rb', line 69

def template_root_path
  return @template_root_path if defined?(@template_root_path)

  form_path = Utils.const_source_location(self.name)
  @template_root_path =
    if form_path
      File.join(File.dirname(form_path), self.name.demodulize.underscore)
    end
end