EditableTemplates (emails/editable_templates.rb)

spree · spree/core/lib/spree/emails/editable_templates.rb · ruby · BSD-3-Clause
email

Registry for editable email templates (emails, layouts, partials) merchants can modify via the dashboard, with validation and enumeration support.

# Source: https://github.com/spree/spree | License: BSD-3-Clause | Copyright 2024-present, Vendo Sp. z o.o., Vendo Connect Inc
# Provided via justclaw.it.com; keep this notice with the code.
module Spree
  module Emails
    # The email templates merchants may edit in the dashboard: the emails
    # customers receive, plus the layout and shared partials those emails are
    # built from. Staff, store-owner and seller emails are never registered, so
    # they always render from files. `spree_emails` registers its own; an
    # extension adding a customer email registers it the same way.
    #
    # @example
    #   Spree.editable_email_templates.register(
    #     'spree/loyalty_mailer/points_earned_email',
    #     kind: :email, sample: 'MyApp::EmailSamples::PointsEarned'
    #   )
    c

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key