do not call pphotos on a non StatusMessage in the page title helper either
This commit is contained in:
parent
2cbfe75686
commit
26aff017df
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue