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

Setting context globally #15

Open
oyeanuj opened this issue Dec 10, 2017 · 2 comments
Open

Setting context globally #15

oyeanuj opened this issue Dec 10, 2017 · 2 comments
Assignees

Comments

@oyeanuj
Copy link
Contributor

oyeanuj commented Dec 10, 2017

Hi @yosiat, a question about translating an AMS pattern to panko:

serialization_scope: AMS allows you to set serialization scope at ApplicationController level which commonly seems to be used for passing in the current user.

serialization_scope :current_user

Now I notice that there is context provided in Panko which would serve the same purpose but wondering if that can be set at a global or per-controller level? Or is that something to be set with each render call?

@yosiat
Copy link
Owner

yosiat commented Dec 11, 2017

Hi @oyeanuj !

Currently, since Panko doesn't support it you need to pass it in each render call.
In the next release or the one after it, I will add support for this.

@yosiat yosiat self-assigned this Dec 11, 2017
@oyeanuj
Copy link
Contributor Author

oyeanuj commented Jan 8, 2018

@yosiat Sweet, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants