Closed lexruee closed 9 years ago
@Bergrebell
Can you refactor these lines in the users controller and put them in a method callaed gravatar_tag?
gravatar_id = Digest::MD5.hexdigest(@user.email.downcase)
@gravatar_url = "http://gravatar.com/avatar/#{gravatar_id}.png?s=125&d"
....
image_tag @gravatar_url
Example usage:
<%= gravatar_tag 'test@test.com %>
Rails tag helper: http://stackoverflow.com/questions/3797040/create-custom-html-helpers-in-ruby-on-rails
@lexruee thanks! i'll do it!
refined in commit: 3cadabf9230587bb60940fc5b234126df702ca87
integrate gravatar into our app