diff options
author | Steffen van Bergerem <svbergerem@online.de> | 2015-08-02 23:47:35 +0300 |
---|---|---|
committer | Jonne Haß <me@jhass.eu> | 2015-08-06 23:55:41 +0300 |
commit | dc576fb0d615db3d2a4626ff3c85bcd4483d910a (patch) | |
tree | 6f14050e224f740f8d46b1b3b591bff93fc777a9 /app/helpers | |
parent | f1d6e9440b9786ab315b4b1ba66c16965a876958 (diff) |
Check if person is nil in person_image_tag
closes #6286
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/people_helper.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/helpers/people_helper.rb b/app/helpers/people_helper.rb index e52612bf9..78b58f8fd 100644 --- a/app/helpers/people_helper.rb +++ b/app/helpers/people_helper.rb @@ -32,6 +32,7 @@ module PeopleHelper end def person_image_tag(person, size = :thumb_small) + return "" if person.nil? || person.profile.nil? image_tag(person.profile.image_url(size), :alt => person.name, :class => 'avatar', :title => person.name, 'data-person_id' => person.id) end |