Class: Liquid::ContactForm
- Inherits:
-
DmCore::LiquidTag
- Object
- DmCore::LiquidTag
- Liquid::ContactForm
- Defined in:
- lib/dm_cms/liquid/tags/contact_form.rb
Class Method Summary collapse
-
.details ⇒ Object
——————————————————————————.
Instance Method Summary collapse
-
#render(context) ⇒ Object
——————————————————————————.
Class Method Details
.details ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/dm_cms/liquid/tags/contact_form.rb', line 12 def self.details { name: self.tag_name, summary: 'Contact form tag', category: 'form', description: <<-END_OF_DESCRIPTION Includes a system standard contact form. ~~~ {% contact_form %} ~~~ If you have a custom form, provide it's name ~~~ {% contact_form name: tech_support %} ~~~ END_OF_DESCRIPTION } end |
Instance Method Details
#render(context) ⇒ Object
6 7 8 9 |
# File 'lib/dm_cms/liquid/tags/contact_form.rb', line 6 def render(context) partial_name = @attributes['name'].present? ? "#{@attributes['name']}_contact_form" : 'contact_form' context.registers[:view].render(:partial => "liquid_tags/#{partial_name}") end |