mirror of
https://github.com/wahyd4/libr-2.git
synced 2026-08-08 21:07:08 +10:00
伤不起 的错误.登录后timeline 不见了
This commit is contained in:
@@ -8,13 +8,13 @@ class EachPostSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def first_sharer
|
||||
user = ShareInstance.where(sharable_id: object.id).first.try(:user)
|
||||
user = ShareInstance.where(sharable_id: object.id).first.user
|
||||
user_info_json(user)
|
||||
end
|
||||
|
||||
def last_sharer
|
||||
return nil if ShareInstance.where(sharable_id: object.id).count == 1
|
||||
user = ShareInstance.where(sharable_id: object.id).last.try(:user)
|
||||
user = ShareInstance.where(sharable_id: object.id).last.user
|
||||
user_info_json(user)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user