noosfero | metadata: fix og:title on profiles

Bráulio Bhavamitra gitlab at gitlab.com
Fri Mar 13 23:07:24 BRT 2015


Bráulio Bhavamitra pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>

Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/dac513ed246b2ba207845ae7fa91b0dce51c2391">dac513ed</a> by Braulio Bhavamitra
metadata: fix og:title on profiles

- - - - -


Changes:

=====================================
plugins/metadata/lib/ext/profile.rb
=====================================
--- a/plugins/metadata/lib/ext/profile.rb
+++ b/plugins/metadata/lib/ext/profile.rb
@@ -5,7 +5,7 @@ class Profile
   metadata_spec namespace: :og, tags: {
     type: MetadataPlugin.og_types[:profile] || :profile,
     image: proc{ |p, plugin| "#{p.environment.top_url}#{p.image.public_filename}" if p.image },
-    title: proc{ |p, plugin| p.nickname || p.name },
+    title: proc{ |p, plugin| if p.nickname.present? then p.nickname else p.name end },
     url: proc do |p, plugin|
       #force profile identifier for custom domains and fixed host. see og_url_for
       plugin.og_url_for p.url.merge(profile: p.identifier)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150314/8f5d17f3/attachment.html>


More information about the Noosfero-dev mailing list