[openstreetmap-website] Gravatar support (#131)
Tom Hughes
notifications at github.com
Tue Oct 16 15:08:47 GMT 2012
> @@ -29,4 +45,19 @@ def openid_button(name, url)
> :title => t("user.login.openid_providers.#{name}.title")
> )
> end
> +
> + # Gravatar support
> +
> + # See http://en.gravatar.com/site/implement/images/ for details.
> + def user_gravatar_url(user, options = {})
> + options = {:size => 80}.merge! options
Sure, but I assumed at that point we would probably completely refactor how we handled the sizes, and quite likely then we wouldn't have a default here at all as it would always be specified which size we wanted.
Even if we were going to keep it here a simple `size = options[:size] || 80` would make more sense than merging an array which we're only ever going to use one option from.
---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/131/files#r1855169
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20121016/0a181420/attachment-0001.html>
More information about the rails-dev
mailing list