Replies: 1 comment 2 replies
-
I think this issue has been introduced in #1666. If this worked previously, I'm not sure whether we need to prevent calling
That seems like a reasonable workaround, but I understand it's not ideal to force you to change the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey gang,
Up until the update to 3.0, we've been using a pattern like this to define our view components with default values:
With the upgrade to 3.0, this is now raising a
ViewComponent::TranslateCalledBeforeRenderError
because of the way I assume thedry-initializer
gem works internally.Does anyone have any bright ideas on a neat way to solve this such that we can maintain the declarative API that we have but not raise the error? I'd rather not update all the call-sites to mitigate the use of the
default
. I guess the only way would be to make it optional and then in abefore_render
hook fall back to the cancel translation if it isn't provided?Beta Was this translation helpful? Give feedback.
All reactions