Just stumbled upon this problem. I had a newsfeed that displayed a post. Containing a title and it's content. However now I added a new feature which is the comments model. Thus the keys saved in the activities table are no longer just 'post.create' but also 'comment.create'.
The problem arises when I call:
<li><strong><%= activity.trackable.title %></strong></li>
because usually it just find that the trackable is a post. Now it also has comments and the comments model has no title, thus it returns an error.
My question is how do I make it so that I can only call the 'post.create' part or a 'trackable_type' that == 'Post'.
This way I can only show the posts in the newsfeed.