fix issue.

This commit is contained in:
2015-12-02 23:26:46 +08:00
parent a3f8caf6ce
commit de97880225
+1 -1
View File
@@ -14,7 +14,7 @@ class EachPostSerializer < ActiveModel::Serializer
def last_sharer
return nil if ShareInstance.where(sharable_id: object.id).count == 1
user = ShareInstance.where(sharable_id: object.id).last.user
user = ShareInstance.where(sharable_id: object.id).last.try(:user)
user_info_json(user)
end