Pregunta

To implement a gravatar for an instance of user is <%= gravatar_for @user %>.

What if I wanted to specify another user, an admin user, who would have a permanent gravatar in the views of all regular users. How would I go about implementing this?

¿Fue útil?

Solución

You'd have to either pull the admin user out of the database and use gravatar_for(@admin_user) or just hardcode the gravatar URL into an image_tag.

Do the latter if you can get away with it.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top