[openstreetmap/openstreetmap-website] Add a basic when-last-changed feature to the history pages (PR #3535)

JesseWeinstein notifications at github.com
Mon Apr 25 15:21:04 UTC 2022


@JesseWeinstein commented on this pull request.



> @@ -31,4 +31,4 @@
 </div>
 <% end %>
 
-<%= render :partial => "tag_details", :object => common_details.tags %>
+<%= render :partial => "tag_details", :object => (local_assigns[:tag_history] or common_details.tags), :locals => { :is_history => local_assigns[:is_history] } %>

`local_assigns` is needed because these variables aren't *always* passed (I think?), and so referring to them directly will throw an exception when they are missing, rather than just returning `nil`. I suspect there's a better way to do this, though!

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

Message ID: <openstreetmap/openstreetmap-website/pull/3535/review/952051977 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220425/a262c81b/attachment.htm>


More information about the rails-dev mailing list