@tomhughes commented on this pull request.


> +    return "" unless params[:lat].present? && params[:lon].present?
+
+    "#map=#{params[:zoom] || 17}/#{params[:lat]}/#{params[:lon]}"

I suggest just returning the target:
```suggestion
    return nil unless params[:lat].present? && params[:lon].present?

    [params[:zoom] || 17, params[:lat], params[:lon]].join("/")
```

> @@ -23,6 +19,7 @@
     <h3 class='fs-5'><%= t "site.welcome.add_a_note.title" %></h3>
     <p><%= t "site.welcome.add_a_note.para_1" %></p>
     <p><%= t ".how_to_help.add_a_note.instructions_1_html", :note_icon => 
tag.a(:class => "icon note bg-dark rounded-1",
+                                                                               
 :href => "#{new_note_path}#{map_hash(params)}",

then you can do this:
```suggestion
                                                                                
:href => new_note_path(:anchor => map_hash(params)),
```

> +  <%= editor_query = "?editor=#{params[:editor]}" if params[:editor].present?
+      link_to t(".start_mapping"), "#{edit_path}#{editor_query || 
''}#{map_hash(params)}", :class => "btn btn-primary start-mapping" %>

and this:
```suggestion
  <%= link_to t(".start_mapping"), edit_path(:editor => params[:editor], 
:anchor => map_hash(params)), :class => "btn btn-primary start-mapping" %>
```

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/5887/review/2819429...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to