json.user do
json.id user.id
json.display_name user.display_name
- json.account_created user.creation_time.xmlschema
+ json.account_created user.created_at.xmlschema
json.description user.description if user.description
if current_user && current_user == user && can?(:details, User)
end
if current_user && current_user == user && can?(:details, User)
- if user.home_lat && user.home_lon
+ if user.home_location?
json.home do
json.lat user.home_lat
json.lon user.home_lon
json.count user.sent_messages.size
end
end
+
+ json.email user.email if scope_enabled?(:read_email)
end
end