Hey everyone! ![]()
I’m happy to announce that Marten 0.7 has been officially released! ![]()
![]()
TL;DR
Marten is a batteries-included Crystal web framework focused on making web application development productive, pragmatic, and enjoyable.
Marten 0.7 introduces polymorphic relationships, email attachments, field transformations, decimal fields, template whitespace control, and many other improvements across querying, migrations, deployment, and security.
For a complete overview of everything included in the release, check out the full changelog.
Main new features and highlights
-
Polymorphic relationships — Models can now define relationships where the referenced record may belong to one of several model types. Polymorphic fields integrate with Marten’s ORM and support reverse relationships, type-safe helpers, query scopes, and configurable deletion behavior.
Learn more: Relationships | Marten
-
Email attachments — Emails can now include attachments using the new
#attachmethod. Files can be attached from paths, existingFileobjects, or arbitrary IOs, making it straightforward to send both static files and dynamically generated content. Learn more. -
Field transformations — Query sets can now filter date and date/time fields by components such as year, month, day, hour, minute, and second. Transformations happen directly at the SQL level and can be combined with regular field predicates. Learn more.
-
Decimal fields — New
decimalmodel and schema fields make it possible to work with fixed-precision decimal values backed by Crystal’sBigDecimal. They are especially useful for monetary values and other data where floating-point precision is undesirable. See the model field and schema field documentation. -
Template whitespace control — Marten’s template language now supports stripping whitespace around tags, variables, and comments using hyphens in delimiters, giving you more precise control over rendered output. Learn more.
And more
Marten 0.7 also includes a large number of smaller features, refinements, and fixes, including new query APIs, improved migration workflows, PostgreSQL concurrent index operations, additional HTTP security protections, deployment tooling, and Unix socket support.
Check out the full changelog for all the details.
Want to give Marten a try?
Feedback and contributions are always welcome. If you encounter a bug, have an idea, or want to discuss something, feel free to:
-
Check out the Marten GitHub repository
-
Explore the official documentation
-
Open an issue or discussion on GitHub
-
Join us on Discord
Thanks for reading, and I hope you enjoy Marten 0.7! ![]()