diff --git a/capitalize_decorator.rb b/capitalize_decorator.rb index 20cefa6..5ef0f1d 100644 --- a/capitalize_decorator.rb +++ b/capitalize_decorator.rb @@ -2,6 +2,7 @@ class CapitalizeDecorator < Decorator def correct_name - super.capitalize + nameable_name = @nameable.respond_to?(:correct_name) ? @nameable.correct_name : @nameable + nameable_name.to_s.capitalize end end