diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb index b458cd8..10745fe 100644 --- a/app/helpers/main_helper.rb +++ b/app/helpers/main_helper.rb @@ -5,9 +5,9 @@ module MainHelper def object_name(object) if object.nil? nil - elsif object.respond_to?(:name) + elsif object.respond_to?(:name) && object.name object.name - elsif object.respond_to?(:title) + elsif object.respond_to?(:title) && object.title object.title else "#{object.class.to_s} ##{object.id}"