diff --git a/lib/open_project/themes/theme.rb b/lib/open_project/themes/theme.rb index e548c2edf9..bee51c6a40 100644 --- a/lib/open_project/themes/theme.rb +++ b/lib/open_project/themes/theme.rb @@ -73,13 +73,13 @@ module OpenProject # 'OpenProject::Themes::GoofyTheme' => :'goofy' def identifier - @identifier ||= self.class.to_s.gsub(/Theme\z/, '').demodulize.underscore.dasherize.to_sym + @identifier ||= base_name.underscore.dasherize.to_sym end attr_writer :identifier # 'OpenProject::Themes::GoofyTheme' => 'Goofy' def name - @name ||= self.class.to_s.gsub(/Theme\z/, '').demodulize.titleize + @name ||= base_name.titleize end def stylesheet_manifest @@ -129,6 +129,11 @@ module OpenProject include Singleton abstract! + + private + def base_name + self.class.to_s.gsub(/Theme\z/, '').demodulize + end end end end