Module: Primer::Forms::ActsAsComponent
Overview
Defined Under Namespace
Modules: InstanceMethods
Classes: TemplateGlob, TemplateParams
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.extended(base) ⇒ Object
46
47
48
|
# File 'app/lib/primer/forms/acts_as_component.rb', line 46
def self.extended(base)
base.include(InstanceMethods)
end
|
Instance Method Details
#compile! ⇒ Object
58
59
60
61
62
63
64
65
66
67
|
# File 'app/lib/primer/forms/acts_as_component.rb', line 58
def compile!
return if defined?(@compiled) && @compiled && !Rails.env.development?
template_globs.each do |template_glob|
compile_templates_in(template_glob)
end
@compiled = true
end
|
#renders_templates(glob_pattern, method_name = nil, &block) ⇒ Object
Also known as:
renders_template
53
54
55
|
# File 'app/lib/primer/forms/acts_as_component.rb', line 53
def renders_templates(glob_pattern, method_name = nil, &block)
template_globs << TemplateGlob.new(glob_pattern, method_name, block)
end
|