[openstreetmap-website] Deduplicate object metadata code (refactoring) (#611)

Tom Hughes notifications at github.com
Tue Dec 3 19:46:15 UTC 2013


> +    user_id = changeset_cache[osm.changeset_id]
> +
> +    if user_display_name_cache.key?(user_id)
> +      # use the cache if available
> +    elsif osm.changeset.user.data_public?
> +      user_display_name_cache[user_id] = osm.changeset.user.display_name
> +    else
> +      user_display_name_cache[user_id] = nil
> +    end
> +
> +    unless user_display_name_cache[user_id].nil?
> +      el1['user'] = user_display_name_cache[user_id]
> +      el1['uid'] = user_id.to_s
> +    end
> +
> +    end

Indentation is screwed up here - thought you actually had too many `end` lines for a minute but it's actually just wrong indented.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/611/files#r8072735
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20131203/db6a8552/attachment.html>


More information about the rails-dev mailing list