-
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: # frozen_string_literal: true
module ModalFooter
class Component < ApplicationComponent
extend Dry::Initializer
option :close_title, default: proc { t('action.cancel') }
end
end With the upgrade to 3.0, this is now raising a 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 |
Beta Was this translation helpful? Give feedback.
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.
Understood, so I guess there's no way to still use
translate
in dry-initializer declarations, since the proc is called when the component is initialized, not rendered.