Sha256: ba3d537a51b4e174c9e5ecc7808c10f4c2733965335faa40310aa15e1c9f29f1
Contents?: true
Size: 696 Bytes
Versions: 38
Compression:
Stored size: 696 Bytes
Contents
/ Example / = wcms_component 'forms/yaml_editor', / form: f, / attribute: :presentation_yaml, / value: @custom_profile.presentation_yaml / ruby: form ||= nil attribute ||= nil html_class ||= 'form-control' value ||= nil embedded_image_url ||= wcms_components_embedded_images_url # Set default value # We have to do it this way in case value is an empty string (as opposed to nil). value = value.presence || "---\n# YAML data goes here...\n" = wcms_component("shared/embedded_image_uploader", embedded_image_url: embedded_image_url) .ace_yaml_editor = wcms_component("forms/text_area", {form: form, attribute: attribute, html_class: html_class, value: value})
Version data entries
38 entries across 38 versions & 1 rubygems