@pablobm commented on this pull request.
> @@ -4,6 +4,14 @@ xml.tag! "user", :id => user.id,
:display_name => user.display_name,
:account_created => user.created_at.xmlschema do
xml.tag! "description", user.description if user.description
+ xml.tag! "company", user.company if user.company
+ if user.social_links
This will be truthy when there are no links, since in Ruby an empty array is
truthy. If you want it not to show in the "no links" case, then do something
like this:
```suggestion
if user.social_links.present?
```
> @@ -4,6 +4,14 @@ xml.tag! "user", :id => user.id,
:display_name => user.display_name,
:account_created => user.created_at.xmlschema do
xml.tag! "description", user.description if user.description
+ xml.tag! "company", user.company if user.company
+ if user.social_links
+ xml.tag! "social-links" do
+ user.social_links.each do |link|
+ xml.tag! "link", link["url"]
Is it worth including the platform?
```suggestion
details = link.parsed
xml.tag! "link", details[:url], :platform => details[:platform]
```
And something similar for the JSON case.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6452#pullrequestreview-3356010641
You are receiving this because you are subscribed to this thread.
Message ID:
<openstreetmap/openstreetmap-website/pull/6452/review/[email protected]>_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev