You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
535 B
14 lines
535 B
# frozen_string_literal: true
|
|
|
|
class ApplicationViewComponent < ViewComponentContrib::Base
|
|
extend Dry::Initializer
|
|
|
|
# It seems like there is an issue with the translation as we use them
|
|
# Because view_component_contrib defines a scope as array and then view_component expects a string
|
|
# the result is messed up. Here I override contrib's behaviour to keep a string
|
|
def self.i18n_scope
|
|
return @i18n_scope if defined?(@i18n_scope)
|
|
|
|
@i18n_scope = self.class.name.sub('::Component', '').underscore.tr('/', '.')
|
|
end
|
|
end
|
|
|