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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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 animage_tag.Do the latter if you can get away with it.