Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
CI / scan_ruby (push) Failing after 11m20s
CI / scan_js (push) Successful in 10m35s
CI / lint (push) Has been cancelled

Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-17 23:01:48 +02:00
co-authored by Cursor
commit c4e5f289cf
258 changed files with 11293 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
class MailTemplate < ApplicationRecord
include Auditable
include HtmlBlankable
belongs_to :project, optional: true
has_many :mailings, dependent: :nullify
has_many :mailings_as_b, class_name: "Mailing", foreign_key: :mail_template_b_id, dependent: :nullify
clears_blank_html :body_html
validates :name, :subject, :body_html, presence: true
scope :for_project, ->(project) {
where(project_id: [nil, project&.id].compact).order(:name)
}
def preview_html(organization: nil, contact: nil, project: nil, opportunity: nil)
MailMerge.render(body_html, organization:, contact:, project:, opportunity:)
end
end