Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add @context support for JStachio module #3302

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

agentgt
Copy link
Contributor

@agentgt agentgt commented Dec 22, 2023

@jknack

JStachio added support for loose key->value stuff like request attributes. Originally this was a pain in the butt if you had say CSRF token you would have to add it manually to all models.

More info on that can be found here:

https://jstach.io/jstachio/io.jstach.jstachio/io/jstach/jstachio/context/package-summary.html

So now say something like CSRF token is bound to Context.getAttributes you can access it in JStachio like:

{{@context.csrf}}

This PR makes that possible.

Copy link
Member

@jknack jknack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a minimal example to the jstachio jooby doc?

@agentgt
Copy link
Contributor Author

agentgt commented Dec 27, 2023

@jknack Will do. I ran out of time right before the holidays and meant to leave it in draft mode for a little longer.

@jknack
Copy link
Member

jknack commented Dec 27, 2023

@agentgt Ok, going to merge and release. We can update doc later.

@jknack jknack added this to the 3.0.7 milestone Dec 27, 2023
@jknack jknack merged commit 9a703e9 into jooby-project:3.x Dec 27, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants