From c7284557132f22945532dda7f8e26585bfe64c22 Mon Sep 17 00:00:00 2001 From: Leandro Nunes dos Santos Date: Tue, 20 Oct 2015 10:52:14 -0300 Subject: [PATCH] avoid error in other environment without conference --- lib/ext/person.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ext/person.rb b/lib/ext/person.rb index 4bed028..4eec24c 100644 --- a/lib/ext/person.rb +++ b/lib/ext/person.rb @@ -18,6 +18,7 @@ class Person end def conference_comments - Profile['conferencia'].comments_received.where(author_id: id) + profile = Profile['conferencia'] + profile.nil? ? [] : profile.comments_received.where(author_id: id) end end -- libgit2 0.21.2