You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We allow access to certain fields on the user (email, etc.) only if context[:current_user] == record but this can't currently be used with caching in any reasonable manner.
For now I'm just caching a copy for each user who sees it, but that's absurd and definitely not what we need. Is there a better solution, or would it be possible to get the record inside Resource.attribute_caching_context(context)?
We allow access to certain fields on the user (email, etc.) only if
context[:current_user] == recordbut this can't currently be used with caching in any reasonable manner.For now I'm just caching a copy for each user who sees it, but that's absurd and definitely not what we need. Is there a better solution, or would it be possible to get the record inside
Resource.attribute_caching_context(context)?