[openstreetmap/openstreetmap-website] Set og:description meta tag to diary entry description (PR #5056)

Andy Allan notifications at github.com
Wed Aug 7 14:32:00 UTC 2024


@gravitystorm commented on this pull request.



> @@ -1,15 +1,15 @@
 module OpenGraphHelper
   require "addressable/uri"
 
-  def opengraph_tags(title = nil, og_image = nil, og_image_alt = nil)
+  def opengraph_tags(title = nil, properties = {})

This helper is only called in one place in the codebase, and it is called with two parameters. So the defaults never apply. They can be omitted entirely. 

Even if you call it as `opengraph_tags(nil, nil)` (or things that evaluate to nil, like an undefined instance variable) then `properties` will be `nil`, not `{}`.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5056/review/2225385687 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240807/4280df06/attachment.htm>


More information about the rails-dev mailing list