diff --git a/app/models/profile.rb b/app/models/profile.rb index 33d5cc7..e2c28c5 100644 --- a/app/models/profile.rb +++ b/app/models/profile.rb @@ -2,6 +2,7 @@ class Profile < ApplicationRecord has_many :posts def full_name - [first_name, last_name].map(&:presence).compact.join ' ' + [first_name, last_name].map(&:presence).compact.join(' ').presence || + "Profile#{" ##{id}" if id.present?}" end end