Skip to content

Commit 4ea6ba2

Browse files
committed
[WIP] remove thumbnail_url
1 parent c0ea09e commit 4ea6ba2

File tree

6 files changed

+9
-13
lines changed

6 files changed

+9
-13
lines changed

app/controllers/users_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def autocomplete
146146
name: user.display_name,
147147
twitter: user.twitter,
148148
github: user.github,
149-
thumbnail: user.thumbnail_url
149+
thumbnail: user.avatar.url
150150
} },
151151
data: @users.collect(&:username)
152152
}.to_json

app/helpers/users_helper.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ def show_private_message?
1010
end
1111

1212
def avatar_image_tag(user, options = {})
13-
return nil if user.thumbnail_url.blank?
1413
options['data-user'] = user.username
1514
link_to(
1615
users_image_tag(user),
@@ -31,7 +30,7 @@ def users_image_tag(user, options = {})
3130

3231
#TODO Remove
3332
def users_image_path(user)
34-
user.avatar_url
33+
user.avatar.url
3534
end
3635

3736
def user_or_team_image_path(user_or_team)

app/jobs/generate_top_users_composite_job.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def perform
1313
private
1414

1515
def cache_users
16-
users = User.top(108).map { |u| {u.username => u.thumbnail_url} }.to_json
16+
users = User.top(108).map { |u| {u.username => u.avatar.url} }.to_json
1717
Redis.current.set 'top_users', users
1818
end
1919

app/models/user.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ def public_hash(full=false)
416416
hash[:title] = title
417417
hash[:company] = company
418418
hash[:specialities] = speciality_tags
419-
hash[:thumbnail] = thumbnail_url
419+
hash[:thumbnail] = avatar.url
420420
hash[:accomplishments] = highlights.collect(&:description)
421421
hash[:accounts][:twitter] = twitter
422422
end

app/views/highlights/_random.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
.featuredAccomplishment{:class => hide_all_but_first}
44
="\"#{highlight.description}\""
55
.author
6-
=link_to(image_tag(highlight.user.thumbnail_url), badge_path(:username => highlight.user.username))
6+
=link_to(image_tag(highlight.user.avatar.url), badge_path(:username => highlight.user.username))
77
%span=link_to(highlight.user.display_name, badge_path(:username => highlight.user.username))

app/views/users/edit.html.haml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,10 @@
3939

4040
%p.special-p Avatar:
4141
.special-setting
42-
- if @user.avatar.blank?
43-
= image_tag(@user.thumbnail_url, class: 'avatar')
44-
- else
45-
= image_tag(@user.avatar_url, class: 'avatar')
46-
.div
47-
= form.check_box :remove_avatar
48-
= form.label :remove_avatar, "Remove Avatar", class: 'checkbox-label'
42+
= image_tag(@user.avatar_url, class: 'avatar')
43+
.div
44+
= form.check_box :remove_avatar
45+
= form.label :remove_avatar, "Remove Avatar", class: 'checkbox-label'
4946
.div
5047
= form.file_field :avatar
5148
= form.hidden_field :avatar_cache

0 commit comments

Comments
 (0)