Skip to content

Commit

Permalink
remove APP_CONFIG usage from avatar_or_gravatar_url
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Apr 29, 2010
1 parent ca91e89 commit d6c8909
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/models/user/avatar.rb
Expand Up @@ -28,11 +28,9 @@ def avatar_geometry(style = :original)

def avatar_or_gravatar_url(size)
if avatar_file_name
if APP_CONFIG['amazon_s3']['enabled']
avatar.url(size)
else
"http://#{APP_CONFIG['app_domain']}#{avatar.url(size)}"
end
url = avatar.url(size)
url = "http://#{Teambox.config.app_domain}" + url unless url.begins_with? 'http'
url
else
gravatar(size)
end
Expand Down

0 comments on commit d6c8909

Please sign in to comment.