Commit 26aff017 authored by Jonne Haß's avatar Jonne Haß

do not call pphotos on a non StatusMessage in the page title helper either

parent 2cbfe756
......@@ -11,7 +11,7 @@ module PostsHelper
else
if post.text.present?
truncate(post.text(:plain_text => true), :length => 20)
elsif post.photos.present?
elsif post.respond_to?(:photos) && post.photos.present?
I18n.t "posts.show.photos_by", :count => post.photos.size, :author => post.author.name
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment