[openstreetmap/openstreetmap-website] Simplify GPS trace visibility levels (PR #7146)

Ruben L. Mendoza notifications at github.com
Wed Jul 15 15:19:53 UTC 2026


@Rub21 commented on this pull request.



> +  def trace_visibility_options(trace)
+    visibilities = Trace::VISIBILITIES.dup
+    visibilities.unshift(trace.visibility) if Trace.legacy_visibility?(trace.visibility)
+    visibilities.map do |visibility|
+      [t("traces.visibility.#{visibility}"), visibility]
+    end
+  end

Done, I moved the list logic to a new `selectable_visibilities` method  in the  Trace model, and the helper only maps the values to translated labels for the form. 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7146#discussion_r3588522374
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7146/review/4705540811 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260715/c3ec5e9d/attachment.htm>


More information about the rails-dev mailing list