From 49230e51eba9abf5605dea2d60383bbf053fd6eb Mon Sep 17 00:00:00 2001 From: Morgan Aubert Date: Wed, 29 May 2024 20:52:14 -0400 Subject: [PATCH] Update 0.5 release notes --- docs/docs/handlers-and-http/reference/generic-handlers.md | 2 +- docs/docs/the-marten-project/release-notes/0.5.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/handlers-and-http/reference/generic-handlers.md b/docs/docs/handlers-and-http/reference/generic-handlers.md index 1c3affabd..31279af49 100644 --- a/docs/docs/handlers-and-http/reference/generic-handlers.md +++ b/docs/docs/handlers-and-http/reference/generic-handlers.md @@ -317,7 +317,7 @@ end Variables that are added to the global template context will automatically be available to the configured template's runtime. :::tip -The default content type of the response generated when rendering templates is `text/html`, but this can be customized using the [`#content_type`](pathname:///api/dev/Marten/Handlers/Template.html#content_type%3AString|Nil-class-method) class method. For example: +The default content type of the response generated when rendering templates is `text/html`, but this can be customized using the [`#content_type`](pathname:///api/dev/Marten/Handlers/Rendering/ClassMethods.html#content_type(content_type%3AString|Nil)-instance-method) class method. For example: ```crystal class MyHandler < Marten::Handlers::Template diff --git a/docs/docs/the-marten-project/release-notes/0.5.md b/docs/docs/the-marten-project/release-notes/0.5.md index db90180dc..b63438f51 100644 --- a/docs/docs/the-marten-project/release-notes/0.5.md +++ b/docs/docs/the-marten-project/release-notes/0.5.md @@ -78,6 +78,7 @@ article.category # => Category::BLOG * The [`Marten::Handlers::RecordDetail`](../../handlers-and-http/reference/generic-handlers.md#displaying-a-record), [`Marten::Handlers::RecordUpdate`](../../handlers-and-http/reference/generic-handlers.md#updating-a-record), and [`Marten::Handlers::RecordDelete`](../../handlers-and-http/reference/generic-handlers.md#deleting-a-record) generic handlers now provide the ability to specify a custom [query set](../../models-and-databases/queries.md) instead of a model class. This can be achieved through the use of the [`#queryset`](pathname:///api/dev/Marten/Handlers/RecordRetrieving.html#queryset(queryset)-macro) macro. * A new middleware was introduced to make it easy to override the method of incoming requests based on the value of a specific request parameter or header: the [method override middleware](../../handlers-and-http/reference/middlewares.md#method-override-middleware). This mechanism is useful for overriding HTTP methods in HTML forms that natively support GET and POST methods only. A dedicated set of [settings](../../development/reference/settings.md#method-overriding-settings) is also available to easily customize the behavior of this middleware. * The value of the max-age directive used for the Cache-Control header that is set by the [assets serving middleware](../../handlers-and-http/reference/middlewares.md#asset-serving-middleware) can now be configured in the [`assets.max_age`](../../development/reference/settings.md#max_age) setting. +* Subclasses of the [`Marten::Handlers::Template`](../../handlers-and-http/reference/generic-handlers.md#rendering-a-template) generic handler now support a [`#content_type`](pathname:///api/dev/Marten/Handlers/Rendering/ClassMethods.html#content_type(content_type%3AString|Nil)-instance-method) class method that allows configuring the content type of the response (unless specified, the content type will default to `text/html`). #### Templates